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 parts
remove-scene-viewer
Justin Clark-Casey (justincc) 2011-09-13 18:11:13 +01:00
parent f09a90d8a7
commit df73833a2c
2 changed files with 1 additions and 3 deletions

View File

@ -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);

View File

@ -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);
}