Fix bug where tapping home to stop falling would stop any avatar movement other than falling again.
Addresses http://opensimulator.org/mantis/view.php?id=5839iar_mods
parent
679d155a39
commit
c5c079f6aa
|
@ -223,7 +223,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
|
||||||
m_animTickFall = 0;
|
m_animTickFall = 0;
|
||||||
m_animTickJump = 0;
|
m_animTickJump = 0;
|
||||||
m_jumping = false;
|
m_jumping = false;
|
||||||
m_falling = true;
|
m_falling = false;
|
||||||
m_jumpVelocity = 0f;
|
m_jumpVelocity = 0f;
|
||||||
actor.Selected = false;
|
actor.Selected = false;
|
||||||
m_fallHeight = actor.Position.Z; // save latest flying height
|
m_fallHeight = actor.Position.Z; // save latest flying height
|
||||||
|
@ -239,9 +239,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
|
||||||
else if (move.Z < 0f)
|
else if (move.Z < 0f)
|
||||||
{
|
{
|
||||||
if (actor != null && actor.IsColliding)
|
if (actor != null && actor.IsColliding)
|
||||||
{
|
|
||||||
return "LAND";
|
return "LAND";
|
||||||
}
|
|
||||||
else
|
else
|
||||||
return "HOVER_DOWN";
|
return "HOVER_DOWN";
|
||||||
}
|
}
|
||||||
|
@ -260,7 +258,8 @@ namespace OpenSim.Region.Framework.Scenes.Animation
|
||||||
float fallElapsed = (float)(Environment.TickCount - m_animTickFall);
|
float fallElapsed = (float)(Environment.TickCount - m_animTickFall);
|
||||||
float fallVelocity = (actor != null) ? actor.Velocity.Z : 0.0f;
|
float fallVelocity = (actor != null) ? actor.Velocity.Z : 0.0f;
|
||||||
|
|
||||||
if (!m_jumping && (fallVelocity < -3.0f) ) m_falling = true;
|
if (!m_jumping && (fallVelocity < -3.0f))
|
||||||
|
m_falling = true;
|
||||||
|
|
||||||
if (m_animTickFall == 0 || (fallVelocity >= 0.0f))
|
if (m_animTickFall == 0 || (fallVelocity >= 0.0f))
|
||||||
{
|
{
|
||||||
|
@ -297,9 +296,9 @@ namespace OpenSim.Region.Framework.Scenes.Animation
|
||||||
return "PREJUMP";
|
return "PREJUMP";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(m_jumping)
|
if (m_jumping)
|
||||||
{
|
{
|
||||||
if ( (jumptime > (JUMP_PERIOD * 1.5f)) && actor.IsColliding)
|
if ((jumptime > (JUMP_PERIOD * 1.5f)) && actor.IsColliding)
|
||||||
{
|
{
|
||||||
// end jumping
|
// end jumping
|
||||||
m_jumping = false;
|
m_jumping = false;
|
||||||
|
|
|
@ -1274,8 +1274,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
public void HandleAgentUpdate(IClientAPI remoteClient, AgentUpdateArgs agentData)
|
public void HandleAgentUpdate(IClientAPI remoteClient, AgentUpdateArgs agentData)
|
||||||
{
|
{
|
||||||
// m_log.DebugFormat(
|
// m_log.DebugFormat(
|
||||||
// "[SCENE PRESENCE]: In {0} received agent update from {1}",
|
// "[SCENE PRESENCE]: In {0} received agent update from {1}, flags {2}",
|
||||||
// Scene.RegionInfo.RegionName, remoteClient.Name);
|
// Scene.RegionInfo.RegionName, remoteClient.Name, agentData.ControlFlags);
|
||||||
|
|
||||||
if (IsChildAgent)
|
if (IsChildAgent)
|
||||||
{
|
{
|
||||||
|
@ -2312,6 +2312,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// <param name="vec">The vector in which to move. This is relative to the rotation argument</param>
|
/// <param name="vec">The vector in which to move. This is relative to the rotation argument</param>
|
||||||
public void AddNewMovement(Vector3 vec)
|
public void AddNewMovement(Vector3 vec)
|
||||||
{
|
{
|
||||||
|
// m_log.DebugFormat("[SCENE PRESENCE]: Adding new movement {0} for {1}", vec, Name);
|
||||||
|
|
||||||
Vector3 direc = vec * Rotation;
|
Vector3 direc = vec * Rotation;
|
||||||
direc.Normalize();
|
direc.Normalize();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue