aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneManager.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-02-08 19:53:18 +0000
committerJustin Clarke Casey2008-02-08 19:53:18 +0000
commit9d95f9bcf4decd7f9cfcbc8c51a2a9cae567b8bb (patch)
treec7a8b0668d3d08ee23a0cc3c1d23ec953f10dc8d /OpenSim/Region/Environment/Scenes/SceneManager.cs
parent* Dun-dun-dun. JavaScript scripting now actually works. :) (diff)
downloadopensim-SC_OLD-9d95f9bcf4decd7f9cfcbc8c51a2a9cae567b8bb.zip
opensim-SC_OLD-9d95f9bcf4decd7f9cfcbc8c51a2a9cae567b8bb.tar.gz
opensim-SC_OLD-9d95f9bcf4decd7f9cfcbc8c51a2a9cae567b8bb.tar.bz2
opensim-SC_OLD-9d95f9bcf4decd7f9cfcbc8c51a2a9cae567b8bb.tar.xz
Minor ScenePresence related refactoring
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneManager.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneManager.cs26
1 files changed, 11 insertions, 15 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneManager.cs b/OpenSim/Region/Environment/Scenes/SceneManager.cs
index 7156428..9f066d3 100644
--- a/OpenSim/Region/Environment/Scenes/SceneManager.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneManager.cs
@@ -316,21 +316,17 @@ namespace OpenSim.Region.Environment.Scenes
316 List<ScenePresence> avatars = new List<ScenePresence>(); 316 List<ScenePresence> avatars = new List<ScenePresence>();
317 317
318 ForEachCurrentScene(delegate(Scene scene) 318 ForEachCurrentScene(delegate(Scene scene)
319 { 319 {
320 List<EntityBase> EntitieList = scene.GetEntities(); 320 List<ScenePresence> scenePrescences = scene.GetScenePresences();
321 321
322 foreach (EntityBase entity in EntitieList) 322 foreach (ScenePresence scenePrescence in scenePrescences)
323 { 323 {
324 if (entity is ScenePresence) 324 if (!scenePrescence.IsChildAgent)
325 { 325 {
326 ScenePresence scenePrescence = entity as ScenePresence; 326 avatars.Add(scenePrescence);
327 if (!scenePrescence.IsChildAgent) 327 }
328 { 328 }
329 avatars.Add(scenePrescence); 329 });
330 }
331 }
332 }
333 });
334 330
335 return avatars; 331 return avatars;
336 } 332 }
@@ -423,4 +419,4 @@ namespace OpenSim.Region.Environment.Scenes
423 m_localScenes.ForEach(action); 419 m_localScenes.ForEach(action);
424 } 420 }
425 } 421 }
426} \ No newline at end of file 422}