diff options
author | Justin Clark-Casey (justincc) | 2012-07-06 23:07:50 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-07-06 23:07:50 +0100 |
commit | 056c9a59b2fee1e459915bd1ca908107c7c9695d (patch) | |
tree | f163c93b07ff267f523fe2c31e90a7631526a30b /OpenSim/Region/Framework/Scenes/SceneGraph.cs | |
parent | Mantis 6077 trim NPC chat on channel zero. (diff) | |
download | opensim-SC-056c9a59b2fee1e459915bd1ca908107c7c9695d.zip opensim-SC-056c9a59b2fee1e459915bd1ca908107c7c9695d.tar.gz opensim-SC-056c9a59b2fee1e459915bd1ca908107c7c9695d.tar.bz2 opensim-SC-056c9a59b2fee1e459915bd1ca908107c7c9695d.tar.xz |
Add assert to attachment regression tests to check that number of objects in the scene graph
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 | { |