don't auto return objects if they have sitting avatars (not npcs) - mantis 7828 with diferent code

LSLKeyTest
UbitUmarov 2016-07-08 09:56:59 +01:00
parent e38f16d800
commit 11a8a722df
1 changed files with 14 additions and 0 deletions

View File

@ -2225,6 +2225,20 @@ namespace OpenSim.Region.Framework.Scenes
if ((DateTime.UtcNow - RootPart.Rezzed).TotalMinutes >
parcel.LandData.OtherCleanTime)
{
// don't autoreturn if we have a sitting avatar
// mantis 7828 (but none the provided patchs)
if(GetSittingAvatarsCount() > 0)
{
// do not respect npcs
List<ScenePresence> sitters = GetSittingAvatars();
foreach(ScenePresence sp in sitters)
{
if(!sp.IsDeleted && !sp.isNPC && sp.IsSatOnObject)
return;
}
}
DetachFromBackup();
m_log.DebugFormat(
"[SCENE OBJECT GROUP]: Returning object {0} due to parcel autoreturn",