diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/ScenePresence.cs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index e28a523..8e93aae 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -602,10 +602,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
602 | m_pendingObjects = new Queue<SceneObjectGroup>(); | 602 | m_pendingObjects = new Queue<SceneObjectGroup>(); |
603 | 603 | ||
604 | List<EntityBase> ents = new List<EntityBase>(m_scene.Entities.Values); | 604 | List<EntityBase> ents = new List<EntityBase>(m_scene.Entities.Values); |
605 | ents.Sort(delegate(EntityBase a, EntityBase b) | 605 | if (!m_isChildAgent) // Proximity sort makes no sense for |
606 | { | 606 | { // Child agents |
607 | return Vector3.Distance(AbsolutePosition, a.AbsolutePosition).CompareTo(Vector3.Distance(AbsolutePosition, b.AbsolutePosition)); | 607 | ents.Sort(delegate(EntityBase a, EntityBase b) |
608 | }); | 608 | { |
609 | return Vector3.Distance(AbsolutePosition, a.AbsolutePosition).CompareTo(Vector3.Distance(AbsolutePosition, b.AbsolutePosition)); | ||
610 | }); | ||
611 | } | ||
609 | 612 | ||
610 | foreach (EntityBase e in ents) | 613 | foreach (EntityBase e in ents) |
611 | if (e is SceneObjectGroup) | 614 | if (e is SceneObjectGroup) |