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 | |
parent | Revert "Another stab at mantis #5256" (diff) | |
download | opensim-SC_OLD-797ca8d0e787b20fdd0794f2017268f6e5b175e6.zip opensim-SC_OLD-797ca8d0e787b20fdd0794f2017268f6e5b175e6.tar.gz opensim-SC_OLD-797ca8d0e787b20fdd0794f2017268f6e5b175e6.tar.bz2 opensim-SC_OLD-797ca8d0e787b20fdd0794f2017268f6e5b175e6.tar.xz |
Fixes the nudge movements!
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs | 11 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Prioritizer.cs | 28 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 27 |
3 files changed, 19 insertions, 47 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs index a90e0f3..b8cdfc4 100644 --- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs +++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs | |||
@@ -316,16 +316,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
316 | public void UpdateMovementAnimations() | 316 | public void UpdateMovementAnimations() |
317 | { | 317 | { |
318 | m_movementAnimation = GetMovementAnimation(); | 318 | m_movementAnimation = GetMovementAnimation(); |
319 | 319 | TrySetMovementAnimation(m_movementAnimation); | |
320 | if (m_movementAnimation == "PREJUMP" && !m_scenePresence.Scene.m_usePreJump) | ||
321 | { | ||
322 | // This was the previous behavior before PREJUMP | ||
323 | TrySetMovementAnimation("JUMP"); | ||
324 | } | ||
325 | else | ||
326 | { | ||
327 | TrySetMovementAnimation(m_movementAnimation); | ||
328 | } | ||
329 | } | 320 | } |
330 | 321 | ||
331 | public UUID[] GetAnimationArray() | 322 | public UUID[] GetAnimationArray() |
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) |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index a1c80e5..f64d539 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -2225,33 +2225,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
2225 | { | 2225 | { |
2226 | // WHAT??? | 2226 | // WHAT??? |
2227 | m_log.Debug("[SCENEPRESENCE]: AddNewMovement() called on child agent, making root agent!"); | 2227 | m_log.Debug("[SCENEPRESENCE]: AddNewMovement() called on child agent, making root agent!"); |
2228 | |||
2229 | // we have to reset the user's child agent connections. | ||
2230 | // Likely, here they've lost the eventqueue for other regions so border | ||
2231 | // crossings will fail at this point unless we reset them. | ||
2232 | |||
2233 | List<ulong> regions = new List<ulong>(KnownChildRegionHandles); | ||
2234 | regions.Remove(m_scene.RegionInfo.RegionHandle); | ||
2235 | |||
2236 | MakeRootAgent(new Vector3(127f, 127f, 127f), true); | ||
2237 | |||
2238 | // Async command | ||
2239 | if (m_scene.SceneGridService != null) | ||
2240 | { | ||
2241 | m_scene.SceneGridService.SendCloseChildAgentConnections(UUID, regions); | ||
2242 | |||
2243 | // Give the above command some time to try and close the connections. | ||
2244 | // this is really an emergency.. so sleep, or we'll get all discombobulated. | ||
2245 | System.Threading.Thread.Sleep(500); | ||
2246 | } | ||
2247 | |||
2248 | if (m_scene.SceneGridService != null) | ||
2249 | { | ||
2250 | IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>(); | ||
2251 | if (m_agentTransfer != null) | ||
2252 | m_agentTransfer.EnableChildAgents(this); | ||
2253 | } | ||
2254 | |||
2255 | return; | 2228 | return; |
2256 | } | 2229 | } |
2257 | 2230 | ||