From f79e7597b63d33d9cdee387388af68a988dd8648 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Thu, 6 Nov 2008 16:25:11 +0000 Subject: Disable distance sorting for child agents. It makes no sense there, as the base point for the sort is 128,128,128, causing funny visuals --- OpenSim/Region/Environment/Scenes/ScenePresence.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'OpenSim') 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 m_pendingObjects = new Queue(); List ents = new List(m_scene.Entities.Values); - ents.Sort(delegate(EntityBase a, EntityBase b) - { - return Vector3.Distance(AbsolutePosition, a.AbsolutePosition).CompareTo(Vector3.Distance(AbsolutePosition, b.AbsolutePosition)); - }); + if (!m_isChildAgent) // Proximity sort makes no sense for + { // Child agents + ents.Sort(delegate(EntityBase a, EntityBase b) + { + return Vector3.Distance(AbsolutePosition, a.AbsolutePosition).CompareTo(Vector3.Distance(AbsolutePosition, b.AbsolutePosition)); + }); + } foreach (EntityBase e in ents) if (e is SceneObjectGroup) -- cgit v1.1