diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneGraph.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 16 |
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 |