aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Prioritizer.cs
diff options
context:
space:
mode:
authorjustincc2010-12-15 00:35:36 +0000
committerjustincc2010-12-15 00:35:36 +0000
commitb643661938881af6fc782d39e52040ed6d16f03f (patch)
tree162e0667718b2f68e5f4e90cd10f30e6fa374cbb /OpenSim/Region/Framework/Scenes/Prioritizer.cs
parentreplace ode.dll with one built without asserts turned on (diff)
parentfix mistake in last change of local.include (diff)
downloadopensim-SC_OLD-b643661938881af6fc782d39e52040ed6d16f03f.zip
opensim-SC_OLD-b643661938881af6fc782d39e52040ed6d16f03f.tar.gz
opensim-SC_OLD-b643661938881af6fc782d39e52040ed6d16f03f.tar.bz2
opensim-SC_OLD-b643661938881af6fc782d39e52040ed6d16f03f.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Prioritizer.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Prioritizer.cs28
1 files changed, 18 insertions, 10 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Prioritizer.cs b/OpenSim/Region/Framework/Scenes/Prioritizer.cs
index 19f8180..f9599f5 100644
--- a/OpenSim/Region/Framework/Scenes/Prioritizer.cs
+++ b/OpenSim/Region/Framework/Scenes/Prioritizer.cs
@@ -218,20 +218,28 @@ namespace OpenSim.Region.Framework.Scenes
218 218
219 private double GetPriorityByBestAvatarResponsiveness(IClientAPI client, ISceneEntity entity) 219 private double GetPriorityByBestAvatarResponsiveness(IClientAPI client, ISceneEntity entity)
220 { 220 {
221 ScenePresence presence = m_scene.GetScenePresence(client.AgentId); 221 // If this is an update for our own avatar give it the highest priority
222 if (presence != null) 222 if (client.AgentId == entity.UUID)
223 { 223 return 0.0;
224 // If this is an update for our own avatar give it the highest priority 224 if (entity == null)
225 if (presence == entity) 225 return double.NaN;
226 return 0.0;
227 226
228 // Use group position for child prims 227 // Use group position for child prims
229 Vector3 entityPos = entity.AbsolutePosition; 228 Vector3 entityPos = entity.AbsolutePosition;
230 if (entity is SceneObjectPart) 229 if (entity is SceneObjectPart)
231 entityPos = m_scene.GetGroupByPrim(entity.LocalId).AbsolutePosition; 230 {
231 SceneObjectGroup group = (entity as SceneObjectPart).ParentGroup;
232 if (group != null)
233 entityPos = group.AbsolutePosition;
232 else 234 else
233 entityPos = entity.AbsolutePosition; 235 entityPos = entity.AbsolutePosition;
236 }
237 else
238 entityPos = entity.AbsolutePosition;
234 239
240 ScenePresence presence = m_scene.GetScenePresence(client.AgentId);
241 if (presence != null)
242 {
235 if (!presence.IsChildAgent) 243 if (!presence.IsChildAgent)
236 { 244 {
237 if (entity is ScenePresence) 245 if (entity is ScenePresence)