aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
authorMelanie Thielker2008-11-06 16:25:11 +0000
committerMelanie Thielker2008-11-06 16:25:11 +0000
commitf79e7597b63d33d9cdee387388af68a988dd8648 (patch)
tree0918b886e22f1e7db00f1facfd52c935e4237eb8 /OpenSim/Region/Environment/Scenes
parentChange threat level of osMakeNotecard to High because of it's griefing (diff)
downloadopensim-SC_OLD-f79e7597b63d33d9cdee387388af68a988dd8648.zip
opensim-SC_OLD-f79e7597b63d33d9cdee387388af68a988dd8648.tar.gz
opensim-SC_OLD-f79e7597b63d33d9cdee387388af68a988dd8648.tar.bz2
opensim-SC_OLD-f79e7597b63d33d9cdee387388af68a988dd8648.tar.xz
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
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs11
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)