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
0.6.9-post-fixes
Justin Clark-Casey (justincc) 2010-05-28 18:49:32 +01:00
parent 5074d290e4
commit c7d812802f
1 changed files with 6 additions and 2 deletions

View File

@ -1908,7 +1908,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()
{
@ -1919,10 +1919,14 @@ namespace OpenSim.Region.Framework.Scenes
foreach (EntityBase e in entities)
{
if (e is SceneObjectGroup)
{
SceneObjectGroup sog = (SceneObjectGroup)e;
if (!sog.IsAttachment)
DeleteSceneObject((SceneObjectGroup)e, false);
}
}
}
}
/// <summary>
/// Synchronously delete the given object from the scene.