diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Prioritizer.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Prioritizer.cs | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Prioritizer.cs b/OpenSim/Region/Framework/Scenes/Prioritizer.cs index 1b10e3c..ddae073 100644 --- a/OpenSim/Region/Framework/Scenes/Prioritizer.cs +++ b/OpenSim/Region/Framework/Scenes/Prioritizer.cs | |||
@@ -157,7 +157,7 @@ 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,true); | 160 | uint pqueue = ComputeDistancePriority(client,entity,false); |
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) |
@@ -212,9 +212,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
212 | } | 212 | } |
213 | 213 | ||
214 | // Use the camera position for local agents and avatar position for remote agents | 214 | // Use the camera position for local agents and avatar position for remote agents |
215 | Vector3 presencePos = (presence.IsChildAgent) ? | 215 | // Why would I want that? They could be camming but I still see them at the |
216 | presence.AbsolutePosition : | 216 | // avatar position, so why should I update them as if they were at their |
217 | presence.CameraPosition; | 217 | // camera positions? Makes no sense! |
218 | // TODO: Fix this mess | ||
219 | //Vector3 presencePos = (presence.IsChildAgent) ? | ||
220 | // presence.AbsolutePosition : | ||
221 | // presence.CameraPosition; | ||
222 | |||
223 | Vector3 presencePos = presence.AbsolutePosition; | ||
218 | 224 | ||
219 | // Compute the distance... | 225 | // Compute the distance... |
220 | double distance = Vector3.Distance(presencePos, entityPos); | 226 | double distance = Vector3.Distance(presencePos, entityPos); |
@@ -226,7 +232,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
226 | 232 | ||
227 | for (int i = 0; i < queues - 1; i++) | 233 | for (int i = 0; i < queues - 1; i++) |
228 | { | 234 | { |
229 | if (distance < 10 * Math.Pow(2.0,i)) | 235 | if (distance < 30 * Math.Pow(2.0,i)) |
230 | break; | 236 | break; |
231 | pqueue++; | 237 | pqueue++; |
232 | } | 238 | } |