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
0.6.0-stable
Melanie Thielker 2008-11-06 16:25:11 +00:00
parent 4cd7907314
commit f79e7597b6
1 changed files with 7 additions and 4 deletions

View File

@ -602,10 +602,13 @@ namespace OpenSim.Region.Environment.Scenes
m_pendingObjects = new Queue<SceneObjectGroup>(); m_pendingObjects = new Queue<SceneObjectGroup>();
List<EntityBase> ents = new List<EntityBase>(m_scene.Entities.Values); List<EntityBase> ents = new List<EntityBase>(m_scene.Entities.Values);
ents.Sort(delegate(EntityBase a, EntityBase b) if (!m_isChildAgent) // Proximity sort makes no sense for
{ { // Child agents
return Vector3.Distance(AbsolutePosition, a.AbsolutePosition).CompareTo(Vector3.Distance(AbsolutePosition, b.AbsolutePosition)); ents.Sort(delegate(EntityBase a, EntityBase b)
}); {
return Vector3.Distance(AbsolutePosition, a.AbsolutePosition).CompareTo(Vector3.Distance(AbsolutePosition, b.AbsolutePosition));
});
}
foreach (EntityBase e in ents) foreach (EntityBase e in ents)
if (e is SceneObjectGroup) if (e is SceneObjectGroup)