aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneGraph.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneGraph.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs25
1 files changed, 23 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index 46c22ca..f03cf7b 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -431,6 +431,10 @@ namespace OpenSim.Region.Framework.Scenes
431 /// <returns>true if the object was deleted, false if there was no object to delete</returns> 431 /// <returns>true if the object was deleted, false if there was no object to delete</returns>
432 public bool DeleteSceneObject(UUID uuid, bool resultOfObjectLinked) 432 public bool DeleteSceneObject(UUID uuid, bool resultOfObjectLinked)
433 { 433 {
434// m_log.DebugFormat(
435// "[SCENE GRAPH]: Deleting scene object with uuid {0}, resultOfObjectLinked = {1}",
436// uuid, resultOfObjectLinked);
437
434 EntityBase entity; 438 EntityBase entity;
435 if (!Entities.TryGetValue(uuid, out entity) || (!(entity is SceneObjectGroup))) 439 if (!Entities.TryGetValue(uuid, out entity) || (!(entity is SceneObjectGroup)))
436 return false; 440 return false;
@@ -878,7 +882,8 @@ namespace OpenSim.Region.Framework.Scenes
878 if (Entities.TryGetValue(localID, out entity)) 882 if (Entities.TryGetValue(localID, out entity))
879 return entity as SceneObjectGroup; 883 return entity as SceneObjectGroup;
880 884
881 //m_log.DebugFormat("Entered GetGroupByPrim with localID {0}", localID); 885// m_log.DebugFormat("[SCENE GRAPH]: Entered GetGroupByPrim with localID {0}", localID);
886
882 SceneObjectGroup sog; 887 SceneObjectGroup sog;
883 lock (SceneObjectGroupsByLocalPartID) 888 lock (SceneObjectGroupsByLocalPartID)
884 SceneObjectGroupsByLocalPartID.TryGetValue(localID, out sog); 889 SceneObjectGroupsByLocalPartID.TryGetValue(localID, out sog);
@@ -886,8 +891,24 @@ namespace OpenSim.Region.Framework.Scenes
886 if (sog != null) 891 if (sog != null)
887 { 892 {
888 if (sog.HasChildPrim(localID)) 893 if (sog.HasChildPrim(localID))
894 {
895// m_log.DebugFormat(
896// "[SCENE GRAPH]: Found scene object {0} {1} {2} containing part with local id {3} in {4}. Returning.",
897// sog.Name, sog.UUID, sog.LocalId, localID, m_parentScene.RegionInfo.RegionName);
898
889 return sog; 899 return sog;
890 SceneObjectGroupsByLocalPartID.Remove(localID); 900 }
901 else
902 {
903 lock (SceneObjectGroupsByLocalPartID)
904 {
905 m_log.WarnFormat(
906 "[SCENE GRAPH]: Found scene object {0} {1} {2} via SceneObjectGroupsByLocalPartID index but it doesn't contain part with local id {3}. Removing from entry from index in {4}.",
907 sog.Name, sog.UUID, sog.LocalId, localID, m_parentScene.RegionInfo.RegionName);
908
909 SceneObjectGroupsByLocalPartID.Remove(localID);
910 }
911 }
891 } 912 }
892 913
893 EntityBase[] entityList = GetEntities(); 914 EntityBase[] entityList = GetEntities();