Merge branch 'master' of ssh://opensimulator.org/var/git/opensim into x-opensim

This commit is contained in:
dr scofield (aka dirk husemann)
2009-09-29 17:00:02 +02:00
3 changed files with 42 additions and 1 deletions

View File

@@ -4141,6 +4141,11 @@ namespace OpenSim.Region.Framework.Scenes
m_sceneGraph.ForEachClient(action);
}
public void ForEachSOG(Action<SceneObjectGroup> action)
{
m_sceneGraph.ForEachSOG(action);
}
/// <summary>
/// Returns a list of the entities in the scene. This is a new list so operations perform on the list itself
/// will not affect the original list of objects in the scene.

View File

@@ -1134,6 +1134,23 @@ namespace OpenSim.Region.Framework.Scenes
}
}
protected internal void ForEachSOG(Action<SceneObjectGroup> action)
{
List<SceneObjectGroup> objlist = new List<SceneObjectGroup>(SceneObjectGroupsByFullID.Values);
foreach (SceneObjectGroup obj in objlist)
{
try
{
action(obj);
}
catch (Exception e)
{
// Catch it and move on. This includes situations where splist has inconsistent info
m_log.WarnFormat("[SCENE]: Problem processing action in ForEachSOG: ", e.Message);
}
}
}
#endregion
#region Client Event handlers