diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneGraph.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 3390aba..b23d2e5 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -401,9 +401,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
401 | 401 | ||
402 | if (Entities.ContainsKey(sceneObject.UUID)) | 402 | if (Entities.ContainsKey(sceneObject.UUID)) |
403 | { | 403 | { |
404 | // m_log.DebugFormat( | 404 | m_log.DebugFormat( |
405 | // "[SCENEGRAPH]: Scene graph for {0} already contains object {1} in AddSceneObject()", | 405 | "[SCENEGRAPH]: Scene graph for {0} already contains object {1} in AddSceneObject()", |
406 | // m_parentScene.RegionInfo.RegionName, sceneObject.UUID); | 406 | m_parentScene.RegionInfo.RegionName, sceneObject.UUID); |
407 | 407 | ||
408 | return false; | 408 | return false; |
409 | } | 409 | } |
@@ -1038,6 +1038,18 @@ namespace OpenSim.Region.Framework.Scenes | |||
1038 | } | 1038 | } |
1039 | 1039 | ||
1040 | /// <summary> | 1040 | /// <summary> |
1041 | /// Get all the scene object groups. | ||
1042 | /// </summary> | ||
1043 | /// <returns> | ||
1044 | /// The scene object groups. If the scene is empty then an empty list is returned. | ||
1045 | /// </returns> | ||
1046 | protected internal List<SceneObjectGroup> GetSceneObjectGroups() | ||
1047 | { | ||
1048 | lock (SceneObjectGroupsByFullID) | ||
1049 | return new List<SceneObjectGroup>(SceneObjectGroupsByFullID.Values); | ||
1050 | } | ||
1051 | |||
1052 | /// <summary> | ||
1041 | /// Get a group in the scene | 1053 | /// Get a group in the scene |
1042 | /// </summary> | 1054 | /// </summary> |
1043 | /// <param name="fullID">UUID of the group</param> | 1055 | /// <param name="fullID">UUID of the group</param> |
@@ -1180,11 +1192,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1180 | /// <param name="action"></param> | 1192 | /// <param name="action"></param> |
1181 | protected internal void ForEachSOG(Action<SceneObjectGroup> action) | 1193 | protected internal void ForEachSOG(Action<SceneObjectGroup> action) |
1182 | { | 1194 | { |
1183 | List<SceneObjectGroup> objlist; | 1195 | foreach (SceneObjectGroup obj in GetSceneObjectGroups()) |
1184 | lock (SceneObjectGroupsByFullID) | ||
1185 | objlist = new List<SceneObjectGroup>(SceneObjectGroupsByFullID.Values); | ||
1186 | |||
1187 | foreach (SceneObjectGroup obj in objlist) | ||
1188 | { | 1196 | { |
1189 | try | 1197 | try |
1190 | { | 1198 | { |