Give jumping animations higher priority than movement ones

fix/skillcap
Andrei Kortunov 6 years ago
parent 6a03aa6fdb
commit a0d0e5d2db

@ -1980,15 +1980,9 @@ void CharacterController::update(float duration)
else if(rot.z() != 0.0f && !sneak && !(mPtr == getPlayer() && MWBase::Environment::get().getWorld()->isFirstPerson()))
{
if(rot.z() > 0.0f)
{
movestate = inwater ? CharState_SwimTurnRight : CharState_TurnRight;
mAnimation->disable(mCurrentJump);
}
else if(rot.z() < 0.0f)
{
movestate = inwater ? CharState_SwimTurnLeft : CharState_TurnLeft;
mAnimation->disable(mCurrentJump);
}
}
}
@ -2000,7 +1994,7 @@ void CharacterController::update(float duration)
bool animPlaying = mAnimation->getInfo(mCurrentMovement, &complete);
if (movestate == CharState_None && isTurning())
{
if ((animPlaying && complete < threshold) || mJumpState != jumpstate)
if (animPlaying && complete < threshold)
movestate = mMovementState;
}
}

@ -31,8 +31,10 @@ enum Priority {
Priority_WeaponLowerBody,
Priority_SneakIdleLowerBody,
Priority_SwimIdle,
Priority_Jump,
Priority_Movement,
// Note: in vanilla movement anims have higher priority than jump ones.
// It causes issues with landing animations during movement.
Priority_Jump,
Priority_Hit,
Priority_Weapon,
Priority_Block,

Loading…
Cancel
Save