From 47353ffe4813c632f87aba6978e52570d5bb2b53 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Fri, 8 Feb 2008 19:56:49 +0000 Subject: [PATCH] Minor refactoring --- .../Region/Environment/Scenes/SceneManager.cs | 32 ++++++++----------- 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/OpenSim/Region/Environment/Scenes/SceneManager.cs b/OpenSim/Region/Environment/Scenes/SceneManager.cs index 9f066d3704..17d29590d1 100644 --- a/OpenSim/Region/Environment/Scenes/SceneManager.cs +++ b/OpenSim/Region/Environment/Scenes/SceneManager.cs @@ -289,26 +289,22 @@ namespace OpenSim.Region.Environment.Scenes public void SetDebugPacketOnCurrentScene(int newDebug) { ForEachCurrentScene(delegate(Scene scene) - { - List EntitieList = scene.GetEntities(); + { + List scenePresences = scene.GetScenePresences(); - foreach (EntityBase entity in EntitieList) - { - if (entity is ScenePresence) - { - ScenePresence scenePrescence = entity as ScenePresence; - if (!scenePrescence.IsChildAgent) - { - m_log.Error(String.Format("Packet debug for {0} {1} set to {2}", - scenePrescence.Firstname, - scenePrescence.Lastname, - newDebug)); + foreach (ScenePresence scenePresence in scenePresences) + { + if (!scenePresence.IsChildAgent) + { + m_log.Error(String.Format("Packet debug for {0} {1} set to {2}", + scenePresence.Firstname, + scenePresence.Lastname, + newDebug)); - scenePrescence.ControllingClient.SetDebug(newDebug); - } - } - } - }); + scenePresence.ControllingClient.SetDebug(newDebug); + } + } + }); } public List GetCurrentSceneAvatars()