diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneGraph.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index a59758f..bc9a585 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -958,6 +958,18 @@ namespace OpenSim.Region.Framework.Scenes | |||
958 | } | 958 | } |
959 | 959 | ||
960 | /// <summary> | 960 | /// <summary> |
961 | /// Get all the scene object groups. | ||
962 | /// </summary> | ||
963 | /// <returns> | ||
964 | /// The scene object groups. If the scene is empty then an empty list is returned. | ||
965 | /// </returns> | ||
966 | protected internal List<SceneObjectGroup> GetSceneObjectGroups() | ||
967 | { | ||
968 | lock (SceneObjectGroupsByFullID) | ||
969 | return new List<SceneObjectGroup>(SceneObjectGroupsByFullID.Values); | ||
970 | } | ||
971 | |||
972 | /// <summary> | ||
961 | /// Get a group in the scene | 973 | /// Get a group in the scene |
962 | /// </summary> | 974 | /// </summary> |
963 | /// <param name="fullID">UUID of the group</param> | 975 | /// <param name="fullID">UUID of the group</param> |
@@ -1100,11 +1112,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1100 | /// <param name="action"></param> | 1112 | /// <param name="action"></param> |
1101 | protected internal void ForEachSOG(Action<SceneObjectGroup> action) | 1113 | protected internal void ForEachSOG(Action<SceneObjectGroup> action) |
1102 | { | 1114 | { |
1103 | List<SceneObjectGroup> objlist; | 1115 | foreach (SceneObjectGroup obj in GetSceneObjectGroups()) |
1104 | lock (SceneObjectGroupsByFullID) | ||
1105 | objlist = new List<SceneObjectGroup>(SceneObjectGroupsByFullID.Values); | ||
1106 | |||
1107 | foreach (SceneObjectGroup obj in objlist) | ||
1108 | { | 1116 | { |
1109 | try | 1117 | try |
1110 | { | 1118 | { |