aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-09-13 18:11:13 +0100
committerJustin Clark-Casey (justincc)2011-09-13 18:11:13 +0100
commitdf73833a2c79a1a60536e386b5884581d9f2f4b3 (patch)
tree4f53164d324f1e9986a9a581976ad456ce553a9a
parentextend TestGetSceneObjectByPartLocalId() to test state after scene object del... (diff)
downloadopensim-SC-df73833a2c79a1a60536e386b5884581d9f2f4b3.zip
opensim-SC-df73833a2c79a1a60536e386b5884581d9f2f4b3.tar.gz
opensim-SC-df73833a2c79a1a60536e386b5884581d9f2f4b3.tar.bz2
opensim-SC-df73833a2c79a1a60536e386b5884581d9f2f4b3.tar.xz
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
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs2
2 files changed, 1 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index 4d7bc0c..46c22ca 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -459,7 +459,6 @@ namespace OpenSim.Region.Framework.Scenes
459 SceneObjectPart[] parts = grp.Parts; 459 SceneObjectPart[] parts = grp.Parts;
460 for (int i = 0; i < parts.Length; i++) 460 for (int i = 0; i < parts.Length; i++)
461 SceneObjectGroupsByFullPartID.Remove(parts[i].UUID); 461 SceneObjectGroupsByFullPartID.Remove(parts[i].UUID);
462 SceneObjectGroupsByFullPartID.Remove(grp.RootPart.UUID);
463 } 462 }
464 463
465 lock (SceneObjectGroupsByLocalPartID) 464 lock (SceneObjectGroupsByLocalPartID)
@@ -467,7 +466,6 @@ namespace OpenSim.Region.Framework.Scenes
467 SceneObjectPart[] parts = grp.Parts; 466 SceneObjectPart[] parts = grp.Parts;
468 for (int i = 0; i < parts.Length; i++) 467 for (int i = 0; i < parts.Length; i++)
469 SceneObjectGroupsByLocalPartID.Remove(parts[i].LocalId); 468 SceneObjectGroupsByLocalPartID.Remove(parts[i].LocalId);
470 SceneObjectGroupsByLocalPartID.Remove(grp.RootPart.LocalId);
471 } 469 }
472 470
473 return Entities.Remove(uuid); 471 return Entities.Remove(uuid);
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs
index 9586877..80f198d 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs
@@ -135,7 +135,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
135 135
136 // Now delete the scene object and check again 136 // Now delete the scene object and check again
137 scene.DeleteSceneObject(so, false); 137 scene.DeleteSceneObject(so, false);
138 138
139 Assert.That(scene.GetGroupByPrim(so.LocalId), Is.Null); 139 Assert.That(scene.GetGroupByPrim(so.LocalId), Is.Null);
140 Assert.That(scene.GetGroupByPrim(parts[partsToTestCount - 1].LocalId), Is.Null); 140 Assert.That(scene.GetGroupByPrim(parts[partsToTestCount - 1].LocalId), Is.Null);
141 } 141 }