Return everything at once, it's more efficient that way
parent
ed5dac7e82
commit
d188ed8ed8
|
@ -2191,6 +2191,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
/// </summary>
|
||||
public void DeleteAllSceneObjects(bool exceptNoCopy)
|
||||
{
|
||||
List<SceneObjectGroup> toReturn = new List<SceneObjectGroup>();
|
||||
lock (Entities)
|
||||
{
|
||||
ICollection<EntityBase> entities = new List<EntityBase>(Entities);
|
||||
|
@ -2208,12 +2209,16 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
else
|
||||
{
|
||||
DeRezObject(null, sog.RootPart.LocalId, sog.RootPart.GroupID, DeRezAction.Return, UUID.Zero);
|
||||
toReturn.Add((SceneObjectGroup)e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (toReturn.Count > 0)
|
||||
{
|
||||
returnObjects(toReturn.ToArray(), UUID.Zero);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in New Issue