aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneGraph.cs
diff options
context:
space:
mode:
authorDan Lake2011-10-27 00:42:21 -0700
committerDan Lake2011-10-27 00:42:21 -0700
commitb98613091cd6dc2f914fb5ab38ca33cdff21fc24 (patch)
tree42be01a68146870ddcd64e842a13f2fbb46b4738 /OpenSim/Region/Framework/Scenes/SceneGraph.cs
parentFor now, comment out error message on new script engine console commands. (diff)
downloadopensim-SC_OLD-b98613091cd6dc2f914fb5ab38ca33cdff21fc24.zip
opensim-SC_OLD-b98613091cd6dc2f914fb5ab38ca33cdff21fc24.tar.gz
opensim-SC_OLD-b98613091cd6dc2f914fb5ab38ca33cdff21fc24.tar.bz2
opensim-SC_OLD-b98613091cd6dc2f914fb5ab38ca33cdff21fc24.tar.xz
Added new ForEachRootScenePresence to Scene since almost every delegate passed to ForEachScenePresence checks for !IsChildAgent first. It consolidates child and root handling for coming refactors.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneGraph.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs16
1 files changed, 15 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index caec704..542bd51 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -1190,7 +1190,21 @@ namespace OpenSim.Region.Framework.Scenes
1190 } 1190 }
1191 } 1191 }
1192 } 1192 }
1193 1193
1194 /// <summary>
1195 /// Performs action on all ROOT (not child) scene presences.
1196 /// This is just a shortcut function since frequently actions only appy to root SPs
1197 /// </summary>
1198 /// <param name="action"></param>
1199 public void ForEachRootScenePresence(Action<ScenePresence> action)
1200 {
1201 ForEachScenePresence(delegate(ScenePresence sp)
1202 {
1203 if (!sp.IsChildAgent)
1204 action(sp);
1205 });
1206 }
1207
1194 /// <summary> 1208 /// <summary>
1195 /// Performs action on all scene presences. This can ultimately run the actions in parallel but 1209 /// Performs action on all scene presences. This can ultimately run the actions in parallel but
1196 /// any delegates passed in will need to implement their own locking on data they reference and 1210 /// any delegates passed in will need to implement their own locking on data they reference and