aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-07-06 23:07:50 +0100
committerJustin Clark-Casey (justincc)2012-07-06 23:07:50 +0100
commit056c9a59b2fee1e459915bd1ca908107c7c9695d (patch)
treef163c93b07ff267f523fe2c31e90a7631526a30b /OpenSim/Region/Framework/Scenes
parentMantis 6077 trim NPC chat on channel zero. (diff)
downloadopensim-SC_OLD-056c9a59b2fee1e459915bd1ca908107c7c9695d.zip
opensim-SC_OLD-056c9a59b2fee1e459915bd1ca908107c7c9695d.tar.gz
opensim-SC_OLD-056c9a59b2fee1e459915bd1ca908107c7c9695d.tar.bz2
opensim-SC_OLD-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')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs11
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs18
2 files changed, 24 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 6239d51..d98c01d 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -4474,6 +4474,17 @@ namespace OpenSim.Region.Framework.Scenes
4474 } 4474 }
4475 4475
4476 /// <summary> 4476 /// <summary>
4477 /// Get all the scene object groups.
4478 /// </summary>
4479 /// <returns>
4480 /// The scene object groups. If the scene is empty then an empty list is returned.
4481 /// </returns>
4482 public List<SceneObjectGroup> GetSceneObjectGroups()
4483 {
4484 return m_sceneGraph.GetSceneObjectGroups();
4485 }
4486
4487 /// <summary>
4477 /// Get a group via its UUID 4488 /// Get a group via its UUID
4478 /// </summary> 4489 /// </summary>
4479 /// <param name="fullID"></param> 4490 /// <param name="fullID"></param>
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 {