From 9914e371af90da86c47fe1f57ecfd578cd8e1169 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 19 Aug 2014 04:54:25 +0100 Subject: minor changes to GetPriorityByBestAvatarResponsiveness code --- OpenSim/Region/Framework/Scenes/Prioritizer.cs | 31 +++++++++++++------------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Framework/Scenes/Prioritizer.cs b/OpenSim/Region/Framework/Scenes/Prioritizer.cs index ddae073..36a3e37 100644 --- a/OpenSim/Region/Framework/Scenes/Prioritizer.cs +++ b/OpenSim/Region/Framework/Scenes/Prioritizer.cs @@ -157,30 +157,31 @@ namespace OpenSim.Region.Framework.Scenes private uint GetPriorityByBestAvatarResponsiveness(IClientAPI client, ISceneEntity entity) { - uint pqueue = ComputeDistancePriority(client,entity,false); + uint pqueue = 2; // keep compiler happy ScenePresence presence = m_scene.GetScenePresence(client.AgentId); if (presence != null) { - if (!presence.IsChildAgent) + // All avatars other than our own go into pqueue 1 + if (entity is ScenePresence) + return 1; + + if (entity is SceneObjectPart) { - // All avatars other than our own go into pqueue 1 - if (entity is ScenePresence) + // Attachments are high priority, + if (((SceneObjectPart)entity).ParentGroup.IsAttachment) return 1; - - if (entity is SceneObjectPart) - { - // Attachments are high priority, - if (((SceneObjectPart)entity).ParentGroup.IsAttachment) - return 1; - // Non physical prims are lower priority than physical prims - PhysicsActor physActor = ((SceneObjectPart)entity).ParentGroup.RootPart.PhysActor; - if (physActor == null || !physActor.IsPhysical) - pqueue++; - } + pqueue = ComputeDistancePriority(client, entity, false); + + // Non physical prims are lower priority than physical prims + PhysicsActor physActor = ((SceneObjectPart)entity).ParentGroup.RootPart.PhysActor; + if (physActor == null || !physActor.IsPhysical) + pqueue++; } } + else + pqueue = ComputeDistancePriority(client, entity, false); return pqueue; } -- cgit v1.1