diff options
author | UbitUmarov | 2015-09-30 20:37:14 +0100 |
---|---|---|
committer | UbitUmarov | 2015-09-30 20:37:14 +0100 |
commit | 6df75a927cfa36d0f3876653033a9d12e3e78dfd (patch) | |
tree | 62399cfc082e78b2123fc565839c5c1b14ff4391 /OpenSim/Region/Framework/Scenes/Animation | |
parent | add get method on physics actors PIDHoverActive (diff) | |
download | opensim-SC-6df75a927cfa36d0f3876653033a9d12e3e78dfd.zip opensim-SC-6df75a927cfa36d0f3876653033a9d12e3e78dfd.tar.gz opensim-SC-6df75a927cfa36d0f3876653033a9d12e3e78dfd.tar.bz2 opensim-SC-6df75a927cfa36d0f3876653033a9d12e3e78dfd.tar.xz |
let hoverheight rest position be a falling state
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Animation')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs index e80a33b..13d4562 100644 --- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs +++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs | |||
@@ -399,6 +399,15 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
399 | { | 399 | { |
400 | float fallVelocity = actor.Velocity.Z; | 400 | float fallVelocity = actor.Velocity.Z; |
401 | 401 | ||
402 | // if stable on Hover assume falling | ||
403 | if(actor.PIDHoverActive && fallVelocity < 0.05f) | ||
404 | { | ||
405 | Falling = true; | ||
406 | currentControlState = motionControlStates.falling; | ||
407 | m_lastFallVelocity = fallVelocity; | ||
408 | return "FALLDOWN"; | ||
409 | } | ||
410 | |||
402 | if (fallVelocity < -2.5f) | 411 | if (fallVelocity < -2.5f) |
403 | Falling = true; | 412 | Falling = true; |
404 | 413 | ||
@@ -431,7 +440,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
431 | 440 | ||
432 | #region Jumping // section added for jumping... | 441 | #region Jumping // section added for jumping... |
433 | 442 | ||
434 | if (isColliding && heldUp && currentControlState != motionControlStates.jumping) | 443 | if (isColliding && heldUp && currentControlState != motionControlStates.jumping && !actor.PIDHoverActive) |
435 | { | 444 | { |
436 | // Start jumping, prejump | 445 | // Start jumping, prejump |
437 | currentControlState = motionControlStates.jumping; | 446 | currentControlState = motionControlStates.jumping; |