From b98613091cd6dc2f914fb5ab38ca33cdff21fc24 Mon Sep 17 00:00:00 2001 From: Dan Lake Date: Thu, 27 Oct 2011 00:42:21 -0700 Subject: 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. --- OpenSim/Region/Framework/Scenes/SceneManager.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/SceneManager.cs') diff --git a/OpenSim/Region/Framework/Scenes/SceneManager.cs b/OpenSim/Region/Framework/Scenes/SceneManager.cs index a58b87d..3bfd866 100644 --- a/OpenSim/Region/Framework/Scenes/SceneManager.cs +++ b/OpenSim/Region/Framework/Scenes/SceneManager.cs @@ -458,9 +458,9 @@ namespace OpenSim.Region.Framework.Scenes ForEachCurrentScene( delegate(Scene scene) { - scene.ForEachScenePresence(delegate(ScenePresence scenePresence) + scene.ForEachRootScenePresence(delegate(ScenePresence scenePresence) { - if (!scenePresence.IsChildAgent && (name == null || scenePresence.Name == name)) + if (name == null || scenePresence.Name == name) { m_log.DebugFormat("Packet debug for {0} {1} set to {2}", scenePresence.Firstname, @@ -481,10 +481,9 @@ namespace OpenSim.Region.Framework.Scenes ForEachCurrentScene( delegate(Scene scene) { - scene.ForEachScenePresence(delegate(ScenePresence scenePresence) + scene.ForEachRootScenePresence(delegate(ScenePresence scenePresence) { - if (!scenePresence.IsChildAgent) - avatars.Add(scenePresence); + avatars.Add(scenePresence); }); } ); -- cgit v1.1