Adjust Scene.DeleteAllSceneObjects() to not delete objects attached to avatars.

This is going to be the right behaviour in all cases, I should think.
This means that avatars in region when an oar is loaded do not lose their attachments
soprefactor
Justin Clark-Casey (justincc) 2010-05-28 18:49:32 +01:00
parent 1042ce7283
commit 6b568af565
1 changed files with 6 additions and 2 deletions

View File

@ -2121,7 +2121,7 @@ namespace OpenSim.Region.Framework.Scenes
}
/// <summary>
/// Delete every object from the scene
/// Delete every object from the scene. This does not include attachments worn by avatars.
/// </summary>
public void DeleteAllSceneObjects()
{
@ -2132,7 +2132,11 @@ namespace OpenSim.Region.Framework.Scenes
foreach (EntityBase e in entities)
{
if (e is SceneObjectGroup)
DeleteSceneObject((SceneObjectGroup)e, false);
{
SceneObjectGroup sog = (SceneObjectGroup)e;
if (!sog.IsAttachment)
DeleteSceneObject((SceneObjectGroup)e, false);
}
}
}
}