mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 09:45:47 +08:00
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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user