From 6df75a927cfa36d0f3876653033a9d12e3e78dfd Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 30 Sep 2015 20:37:14 +0100 Subject: let hoverheight rest position be a falling state --- .../Framework/Scenes/Animation/ScenePresenceAnimator.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework/Scenes/Animation') 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 { float fallVelocity = actor.Velocity.Z; + // if stable on Hover assume falling + if(actor.PIDHoverActive && fallVelocity < 0.05f) + { + Falling = true; + currentControlState = motionControlStates.falling; + m_lastFallVelocity = fallVelocity; + return "FALLDOWN"; + } + if (fallVelocity < -2.5f) Falling = true; @@ -431,7 +440,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation #region Jumping // section added for jumping... - if (isColliding && heldUp && currentControlState != motionControlStates.jumping) + if (isColliding && heldUp && currentControlState != motionControlStates.jumping && !actor.PIDHoverActive) { // Start jumping, prejump currentControlState = motionControlStates.jumping; -- cgit v1.1