diff options
author | Melanie Thielker | 2008-11-06 16:25:11 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-11-06 16:25:11 +0000 |
commit | f79e7597b63d33d9cdee387388af68a988dd8648 (patch) | |
tree | 0918b886e22f1e7db00f1facfd52c935e4237eb8 /OpenSim | |
parent | Change threat level of osMakeNotecard to High because of it's griefing (diff) | |
download | opensim-SC-f79e7597b63d33d9cdee387388af68a988dd8648.zip opensim-SC-f79e7597b63d33d9cdee387388af68a988dd8648.tar.gz opensim-SC-f79e7597b63d33d9cdee387388af68a988dd8648.tar.bz2 opensim-SC-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 '')
-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) |