diff options
author | UbitUmarov | 2014-10-04 07:49:05 +0100 |
---|---|---|
committer | UbitUmarov | 2014-10-04 07:49:05 +0100 |
commit | 6f149ef6aed517d3fb29598ce006ab4e9876be28 (patch) | |
tree | 1018abb38fdf5265c21ded2c534f9e4559de3ea2 /OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs | |
parent | bug fix: revert back check on creating link (diff) | |
download | opensim-SC_OLD-6f149ef6aed517d3fb29598ce006ab4e9876be28.zip opensim-SC_OLD-6f149ef6aed517d3fb29598ce006ab4e9876be28.tar.gz opensim-SC_OLD-6f149ef6aed517d3fb29598ce006ab4e9876be28.tar.bz2 opensim-SC_OLD-6f149ef6aed517d3fb29598ce006ab4e9876be28.tar.xz |
bug fix: leave jumping state only to landing, without fallback into
onsurface, etc
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs index 2d1b0df..ade908d 100644 --- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs +++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs | |||
@@ -307,15 +307,15 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
307 | ); | 307 | ); |
308 | 308 | ||
309 | // Check control flags | 309 | // Check control flags |
310 | /* not in use | 310 | /* not in use |
311 | bool heldForward = ((controlFlags & (AgentManager.ControlFlags.AGENT_CONTROL_AT_POS | AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_POS)) != 0); | 311 | bool heldForward = ((controlFlags & (AgentManager.ControlFlags.AGENT_CONTROL_AT_POS | AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_POS)) != 0); |
312 | bool heldBack = ((controlFlags & (AgentManager.ControlFlags.AGENT_CONTROL_AT_NEG | AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_NEG)) != 0); | 312 | bool heldBack = ((controlFlags & (AgentManager.ControlFlags.AGENT_CONTROL_AT_NEG | AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_NEG)) != 0); |
313 | bool heldLeft = ((controlFlags & (AgentManager.ControlFlags.AGENT_CONTROL_LEFT_POS | AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_POS)) != 0); | 313 | bool heldLeft = ((controlFlags & (AgentManager.ControlFlags.AGENT_CONTROL_LEFT_POS | AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_POS)) != 0); |
314 | bool heldRight = ((controlFlags & (AgentManager.ControlFlags.AGENT_CONTROL_LEFT_NEG | AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_NEG)) != 0); | 314 | bool heldRight = ((controlFlags & (AgentManager.ControlFlags.AGENT_CONTROL_LEFT_NEG | AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_NEG)) != 0); |
315 | */ | 315 | */ |
316 | bool heldTurnLeft = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_TURN_LEFT) == AgentManager.ControlFlags.AGENT_CONTROL_TURN_LEFT; | 316 | bool heldTurnLeft = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_TURN_LEFT) == AgentManager.ControlFlags.AGENT_CONTROL_TURN_LEFT; |
317 | bool heldTurnRight = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_TURN_RIGHT) == AgentManager.ControlFlags.AGENT_CONTROL_TURN_RIGHT; | 317 | bool heldTurnRight = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_TURN_RIGHT) == AgentManager.ControlFlags.AGENT_CONTROL_TURN_RIGHT; |
318 | // bool heldUp = ((controlFlags & (AgentManager.ControlFlags.AGENT_CONTROL_UP_POS | AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_POS)) != 0); | 318 | // bool heldUp = ((controlFlags & (AgentManager.ControlFlags.AGENT_CONTROL_UP_POS | AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_POS)) != 0); |
319 | // excluded nudge up so it doesn't trigger jump state | 319 | // excluded nudge up so it doesn't trigger jump state |
320 | bool heldUp = ((controlFlags & (AgentManager.ControlFlags.AGENT_CONTROL_UP_POS)) != 0); | 320 | bool heldUp = ((controlFlags & (AgentManager.ControlFlags.AGENT_CONTROL_UP_POS)) != 0); |
321 | bool heldDown = ((controlFlags & (AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG | AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG)) != 0); | 321 | bool heldDown = ((controlFlags & (AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG | AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG)) != 0); |
@@ -328,7 +328,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
328 | heldTurnLeft = false; | 328 | heldTurnLeft = false; |
329 | heldTurnRight = false; | 329 | heldTurnRight = false; |
330 | } | 330 | } |
331 | 331 | ||
332 | #endregion Inputs | 332 | #endregion Inputs |
333 | 333 | ||
334 | // no physics actor case | 334 | // no physics actor case |
@@ -432,7 +432,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
432 | #region Jumping // section added for jumping... | 432 | #region Jumping // section added for jumping... |
433 | 433 | ||
434 | if (isColliding && heldUp && currentControlState != motionControlStates.jumping) | 434 | if (isColliding && heldUp && currentControlState != motionControlStates.jumping) |
435 | { | 435 | { |
436 | // Start jumping, prejump | 436 | // Start jumping, prejump |
437 | currentControlState = motionControlStates.jumping; | 437 | currentControlState = motionControlStates.jumping; |
438 | m_jumping = true; | 438 | m_jumping = true; |
@@ -465,6 +465,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
465 | m_jumping = true; | 465 | m_jumping = true; |
466 | return "JUMP"; | 466 | return "JUMP"; |
467 | } | 467 | } |
468 | return CurrentMovementAnimation; | ||
468 | } | 469 | } |
469 | 470 | ||
470 | #endregion Jumping | 471 | #endregion Jumping |
@@ -508,7 +509,6 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
508 | } | 509 | } |
509 | } | 510 | } |
510 | 511 | ||
511 | |||
512 | // next section moved outside paren. and realigned for jumping | 512 | // next section moved outside paren. and realigned for jumping |
513 | 513 | ||
514 | if (heldOnXY) | 514 | if (heldOnXY) |
@@ -530,12 +530,12 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
530 | return "WALK"; | 530 | return "WALK"; |
531 | } | 531 | } |
532 | } | 532 | } |
533 | else if (!m_jumping) | 533 | else |
534 | { | 534 | { |
535 | currentControlState = motionControlStates.onsurface; | 535 | currentControlState = motionControlStates.onsurface; |
536 | Falling = false; | 536 | Falling = false; |
537 | // Not walking | 537 | // Not walking |
538 | if(heldDown) | 538 | if (heldDown) |
539 | return "CROUCH"; | 539 | return "CROUCH"; |
540 | else if (heldTurnLeft) | 540 | else if (heldTurnLeft) |
541 | return "TURNLEFT"; | 541 | return "TURNLEFT"; |