mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 06:06:06 +08:00
let hoverheight rest position be a falling state
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -3363,7 +3363,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
// m_log.DebugFormat("[SCENE PRESENCE]: Force to apply before modification was {0} for {1}", direc, Name);
|
||||
|
||||
if (Animator.currentControlState == ScenePresenceAnimator.motionControlStates.falling)
|
||||
if (Animator.currentControlState == ScenePresenceAnimator.motionControlStates.falling
|
||||
&& (PhysicsActor == null || !PhysicsActor.PIDHoverActive))
|
||||
{
|
||||
if (breaking)
|
||||
direc.Z = -9999f; //hack to tell physics to stop on Z
|
||||
|
||||
Reference in New Issue
Block a user