diff options
author | Diva Canto | 2010-12-11 17:06:17 -0800 |
---|---|---|
committer | Diva Canto | 2010-12-11 17:06:17 -0800 |
commit | 797ca8d0e787b20fdd0794f2017268f6e5b175e6 (patch) | |
tree | fb528297ffdc57154775cca19b47b06bdbaae5b0 /OpenSim/Region/Framework/Scenes/Prioritizer.cs | |
parent | Revert "Another stab at mantis #5256" (diff) | |
download | opensim-SC-797ca8d0e787b20fdd0794f2017268f6e5b175e6.zip opensim-SC-797ca8d0e787b20fdd0794f2017268f6e5b175e6.tar.gz opensim-SC-797ca8d0e787b20fdd0794f2017268f6e5b175e6.tar.bz2 opensim-SC-797ca8d0e787b20fdd0794f2017268f6e5b175e6.tar.xz |
Fixes the nudge movements!
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Prioritizer.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Prioritizer.cs | 28 |
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) |