bug fix: leave jumping state only to landing, without fallback into
onsurface, etcavinationmerge
parent
4ae960a4f0
commit
6f149ef6ae
|
@ -307,15 +307,15 @@ namespace OpenSim.Region.Framework.Scenes.Animation
|
||||||
);
|
);
|
||||||
|
|
||||||
// Check control flags
|
// Check control flags
|
||||||
/* not in use
|
/* not in use
|
||||||
bool heldForward = ((controlFlags & (AgentManager.ControlFlags.AGENT_CONTROL_AT_POS | AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_POS)) != 0);
|
bool heldForward = ((controlFlags & (AgentManager.ControlFlags.AGENT_CONTROL_AT_POS | AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_POS)) != 0);
|
||||||
bool heldBack = ((controlFlags & (AgentManager.ControlFlags.AGENT_CONTROL_AT_NEG | AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_NEG)) != 0);
|
bool heldBack = ((controlFlags & (AgentManager.ControlFlags.AGENT_CONTROL_AT_NEG | AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_NEG)) != 0);
|
||||||
bool heldLeft = ((controlFlags & (AgentManager.ControlFlags.AGENT_CONTROL_LEFT_POS | AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_POS)) != 0);
|
bool heldLeft = ((controlFlags & (AgentManager.ControlFlags.AGENT_CONTROL_LEFT_POS | AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_POS)) != 0);
|
||||||
bool heldRight = ((controlFlags & (AgentManager.ControlFlags.AGENT_CONTROL_LEFT_NEG | AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_NEG)) != 0);
|
bool heldRight = ((controlFlags & (AgentManager.ControlFlags.AGENT_CONTROL_LEFT_NEG | AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_NEG)) != 0);
|
||||||
*/
|
*/
|
||||||
bool heldTurnLeft = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_TURN_LEFT) == AgentManager.ControlFlags.AGENT_CONTROL_TURN_LEFT;
|
bool heldTurnLeft = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_TURN_LEFT) == AgentManager.ControlFlags.AGENT_CONTROL_TURN_LEFT;
|
||||||
bool heldTurnRight = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_TURN_RIGHT) == AgentManager.ControlFlags.AGENT_CONTROL_TURN_RIGHT;
|
bool heldTurnRight = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_TURN_RIGHT) == AgentManager.ControlFlags.AGENT_CONTROL_TURN_RIGHT;
|
||||||
// bool heldUp = ((controlFlags & (AgentManager.ControlFlags.AGENT_CONTROL_UP_POS | AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_POS)) != 0);
|
// bool heldUp = ((controlFlags & (AgentManager.ControlFlags.AGENT_CONTROL_UP_POS | AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_POS)) != 0);
|
||||||
// excluded nudge up so it doesn't trigger jump state
|
// excluded nudge up so it doesn't trigger jump state
|
||||||
bool heldUp = ((controlFlags & (AgentManager.ControlFlags.AGENT_CONTROL_UP_POS)) != 0);
|
bool heldUp = ((controlFlags & (AgentManager.ControlFlags.AGENT_CONTROL_UP_POS)) != 0);
|
||||||
bool heldDown = ((controlFlags & (AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG | AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG)) != 0);
|
bool heldDown = ((controlFlags & (AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG | AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG)) != 0);
|
||||||
|
@ -465,6 +465,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
|
||||||
m_jumping = true;
|
m_jumping = true;
|
||||||
return "JUMP";
|
return "JUMP";
|
||||||
}
|
}
|
||||||
|
return CurrentMovementAnimation;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Jumping
|
#endregion Jumping
|
||||||
|
@ -508,7 +509,6 @@ namespace OpenSim.Region.Framework.Scenes.Animation
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// next section moved outside paren. and realigned for jumping
|
// next section moved outside paren. and realigned for jumping
|
||||||
|
|
||||||
if (heldOnXY)
|
if (heldOnXY)
|
||||||
|
@ -530,12 +530,12 @@ namespace OpenSim.Region.Framework.Scenes.Animation
|
||||||
return "WALK";
|
return "WALK";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!m_jumping)
|
else
|
||||||
{
|
{
|
||||||
currentControlState = motionControlStates.onsurface;
|
currentControlState = motionControlStates.onsurface;
|
||||||
Falling = false;
|
Falling = false;
|
||||||
// Not walking
|
// Not walking
|
||||||
if(heldDown)
|
if (heldDown)
|
||||||
return "CROUCH";
|
return "CROUCH";
|
||||||
else if (heldTurnLeft)
|
else if (heldTurnLeft)
|
||||||
return "TURNLEFT";
|
return "TURNLEFT";
|
||||||
|
|
Loading…
Reference in New Issue