stop the duplicate remove of the root part ids from the full part and local part indexes in SG.DeleteSceneObject()
this is unnecessary because the parts array iterated through contains the root part as well as the non-root partsremove-scene-viewer
parent
f09a90d8a7
commit
df73833a2c
|
@ -459,7 +459,6 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
SceneObjectPart[] parts = grp.Parts;
|
||||
for (int i = 0; i < parts.Length; i++)
|
||||
SceneObjectGroupsByFullPartID.Remove(parts[i].UUID);
|
||||
SceneObjectGroupsByFullPartID.Remove(grp.RootPart.UUID);
|
||||
}
|
||||
|
||||
lock (SceneObjectGroupsByLocalPartID)
|
||||
|
@ -467,7 +466,6 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
SceneObjectPart[] parts = grp.Parts;
|
||||
for (int i = 0; i < parts.Length; i++)
|
||||
SceneObjectGroupsByLocalPartID.Remove(parts[i].LocalId);
|
||||
SceneObjectGroupsByLocalPartID.Remove(grp.RootPart.LocalId);
|
||||
}
|
||||
|
||||
return Entities.Remove(uuid);
|
||||
|
|
|
@ -135,7 +135,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
|
|||
|
||||
// Now delete the scene object and check again
|
||||
scene.DeleteSceneObject(so, false);
|
||||
|
||||
|
||||
Assert.That(scene.GetGroupByPrim(so.LocalId), Is.Null);
|
||||
Assert.That(scene.GetGroupByPrim(parts[partsToTestCount - 1].LocalId), Is.Null);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue