aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Prioritizer.cs
diff options
context:
space:
mode:
authorUbitUmarov2014-08-19 04:54:25 +0100
committerUbitUmarov2014-08-19 04:54:25 +0100
commit9914e371af90da86c47fe1f57ecfd578cd8e1169 (patch)
treefd4f98161588b0e38166c9ae0e08dcb7e9fd560e /OpenSim/Region/Framework/Scenes/Prioritizer.cs
parentstill another ... (diff)
downloadopensim-SC_OLD-9914e371af90da86c47fe1f57ecfd578cd8e1169.zip
opensim-SC_OLD-9914e371af90da86c47fe1f57ecfd578cd8e1169.tar.gz
opensim-SC_OLD-9914e371af90da86c47fe1f57ecfd578cd8e1169.tar.bz2
opensim-SC_OLD-9914e371af90da86c47fe1f57ecfd578cd8e1169.tar.xz
minor changes to GetPriorityByBestAvatarResponsiveness code
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 }