aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs8
1 files changed, 7 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index 4517d11..2caeb14 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -580,7 +580,13 @@ namespace OpenSim.Region.Environment.Scenes
580 { 580 {
581 m_pendingObjects = new Queue<SceneObjectGroup>(); 581 m_pendingObjects = new Queue<SceneObjectGroup>();
582 582
583 foreach (EntityBase e in m_scene.Entities.Values) 583 List<EntityBase> ents = new List<EntityBase>(m_scene.Entities.Values);
584 ents.Sort(delegate(EntityBase a, EntityBase b)
585 {
586 return Vector3.Distance(AbsolutePosition, a.AbsolutePosition).CompareTo(Vector3.Distance(AbsolutePosition, b.AbsolutePosition));
587 });
588
589 foreach (EntityBase e in ents)
584 if (e is SceneObjectGroup) 590 if (e is SceneObjectGroup)
585 m_pendingObjects.Enqueue((SceneObjectGroup)e); 591 m_pendingObjects.Enqueue((SceneObjectGroup)e);
586 } 592 }