mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-19 23:41:34 +00:00
Give jumping animations higher priority than movement ones
This commit is contained in:
parent
6a03aa6fdb
commit
a0d0e5d2db
2 changed files with 4 additions and 8 deletions
|
@ -1980,15 +1980,9 @@ void CharacterController::update(float duration)
|
||||||
else if(rot.z() != 0.0f && !sneak && !(mPtr == getPlayer() && MWBase::Environment::get().getWorld()->isFirstPerson()))
|
else if(rot.z() != 0.0f && !sneak && !(mPtr == getPlayer() && MWBase::Environment::get().getWorld()->isFirstPerson()))
|
||||||
{
|
{
|
||||||
if(rot.z() > 0.0f)
|
if(rot.z() > 0.0f)
|
||||||
{
|
|
||||||
movestate = inwater ? CharState_SwimTurnRight : CharState_TurnRight;
|
movestate = inwater ? CharState_SwimTurnRight : CharState_TurnRight;
|
||||||
mAnimation->disable(mCurrentJump);
|
|
||||||
}
|
|
||||||
else if(rot.z() < 0.0f)
|
else if(rot.z() < 0.0f)
|
||||||
{
|
|
||||||
movestate = inwater ? CharState_SwimTurnLeft : CharState_TurnLeft;
|
movestate = inwater ? CharState_SwimTurnLeft : CharState_TurnLeft;
|
||||||
mAnimation->disable(mCurrentJump);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2000,7 +1994,7 @@ void CharacterController::update(float duration)
|
||||||
bool animPlaying = mAnimation->getInfo(mCurrentMovement, &complete);
|
bool animPlaying = mAnimation->getInfo(mCurrentMovement, &complete);
|
||||||
if (movestate == CharState_None && isTurning())
|
if (movestate == CharState_None && isTurning())
|
||||||
{
|
{
|
||||||
if ((animPlaying && complete < threshold) || mJumpState != jumpstate)
|
if (animPlaying && complete < threshold)
|
||||||
movestate = mMovementState;
|
movestate = mMovementState;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,8 +31,10 @@ enum Priority {
|
||||||
Priority_WeaponLowerBody,
|
Priority_WeaponLowerBody,
|
||||||
Priority_SneakIdleLowerBody,
|
Priority_SneakIdleLowerBody,
|
||||||
Priority_SwimIdle,
|
Priority_SwimIdle,
|
||||||
Priority_Jump,
|
|
||||||
Priority_Movement,
|
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_Hit,
|
||||||
Priority_Weapon,
|
Priority_Weapon,
|
||||||
Priority_Block,
|
Priority_Block,
|
||||||
|
|
Loading…
Reference in a new issue