aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Prioritizer.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Prioritizer.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Prioritizer.cs31
1 files changed, 16 insertions, 15 deletions
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
157 157
158 private uint GetPriorityByBestAvatarResponsiveness(IClientAPI client, ISceneEntity entity) 158 private uint GetPriorityByBestAvatarResponsiveness(IClientAPI client, ISceneEntity entity)
159 { 159 {
160 uint pqueue = ComputeDistancePriority(client,entity,false); 160 uint pqueue = 2; // keep compiler happy
161 161
162 ScenePresence presence = m_scene.GetScenePresence(client.AgentId); 162 ScenePresence presence = m_scene.GetScenePresence(client.AgentId);
163 if (presence != null) 163 if (presence != null)
164 { 164 {
165 if (!presence.IsChildAgent) 165 // All avatars other than our own go into pqueue 1
166 if (entity is ScenePresence)
167 return 1;
168
169 if (entity is SceneObjectPart)
166 { 170 {
167 // All avatars other than our own go into pqueue 1 171 // Attachments are high priority,
168 if (entity is ScenePresence) 172 if (((SceneObjectPart)entity).ParentGroup.IsAttachment)
169 return 1; 173 return 1;
170
171 if (entity is SceneObjectPart)
172 {
173 // Attachments are high priority,
174 if (((SceneObjectPart)entity).ParentGroup.IsAttachment)
175 return 1;
176 174
177 // Non physical prims are lower priority than physical prims 175 pqueue = ComputeDistancePriority(client, entity, false);
178 PhysicsActor physActor = ((SceneObjectPart)entity).ParentGroup.RootPart.PhysActor; 176
179 if (physActor == null || !physActor.IsPhysical) 177 // Non physical prims are lower priority than physical prims
180 pqueue++; 178 PhysicsActor physActor = ((SceneObjectPart)entity).ParentGroup.RootPart.PhysActor;
181 } 179 if (physActor == null || !physActor.IsPhysical)
180 pqueue++;
182 } 181 }
183 } 182 }
183 else
184 pqueue = ComputeDistancePriority(client, entity, false);
184 185
185 return pqueue; 186 return pqueue;
186 } 187 }