mirror of
https://github.com/opensim/opensim.git
synced 2026-08-12 04:05:42 +08:00
change avatar animator on forced hover, needs more testing
This commit is contained in:
@@ -393,16 +393,18 @@ namespace OpenSim.Region.Framework.Scenes.Animation
|
||||
|
||||
if (!isColliding && currentControlState != motionControlStates.jumping)
|
||||
{
|
||||
float fallVelocity = actor.Velocity.Z;
|
||||
// if stable on Hover assume falling
|
||||
if(actor.PIDHoverActive && fallVelocity < 0.05f)
|
||||
|
||||
if(actor.PIDHoverActive)
|
||||
{
|
||||
Falling = true;
|
||||
currentControlState = motionControlStates.falling;
|
||||
m_lastFallVelocity = fallVelocity;
|
||||
return "FALLDOWN";
|
||||
m_animTickFall = 0;
|
||||
m_animTickJump = 0;
|
||||
Falling = false;
|
||||
currentControlState = motionControlStates.flying;
|
||||
m_lastFallVelocity = 0f;
|
||||
return "HOVER";
|
||||
}
|
||||
|
||||
float fallVelocity = actor.Velocity.Z;
|
||||
if (fallVelocity < -2.5f)
|
||||
Falling = true;
|
||||
|
||||
|
||||
@@ -1263,12 +1263,9 @@ namespace OpenSim.Region.PhysicsModule.ubOde
|
||||
break;
|
||||
|
||||
case PIDHoverType.GroundAndWater:
|
||||
if (terrainheight > m_parent_scene.WaterLevel)
|
||||
targetHoverHeight += terrainheight;
|
||||
else
|
||||
targetHoverHeight += m_parent_scene.WaterLevel;
|
||||
targetHoverHeight += terrainheight > m_parent_scene.WaterLevel ? terrainheight : m_parent_scene.WaterLevel;
|
||||
break;
|
||||
} // end switch (m_PIDHoverType)
|
||||
}
|
||||
|
||||
hoverPIDActive = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user