mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
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.
This commit is contained in:
@@ -1190,7 +1190,21 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Performs action on all ROOT (not child) scene presences.
|
||||
/// This is just a shortcut function since frequently actions only appy to root SPs
|
||||
/// </summary>
|
||||
/// <param name="action"></param>
|
||||
public void ForEachRootScenePresence(Action<ScenePresence> action)
|
||||
{
|
||||
ForEachScenePresence(delegate(ScenePresence sp)
|
||||
{
|
||||
if (!sp.IsChildAgent)
|
||||
action(sp);
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Performs action on all scene presences. This can ultimately run the actions in parallel but
|
||||
/// any delegates passed in will need to implement their own locking on data they reference and
|
||||
|
||||
Reference in New Issue
Block a user