1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-21 09:23:51 +00:00

Reset sneak and swim idle animations when moving

This commit is contained in:
Capostrophic 2018-09-23 13:55:49 +03:00
parent 713330351b
commit 56ef11b023

View file

@ -2168,12 +2168,12 @@ void CharacterController::update(float duration)
if(mAnimQueue.empty() || inwater || sneak) if(mAnimQueue.empty() || inwater || sneak)
{ {
// Note: turning animations should not interrupt idle ones // Note: turning animations should not interrupt idle ones
if (inwater) if (movestate != CharState_None && !isTurning())
idlestate = CharState_None;
else if (inwater)
idlestate = CharState_IdleSwim; idlestate = CharState_IdleSwim;
else if (sneak && !inJump) else if (sneak && !inJump)
idlestate = CharState_IdleSneak; idlestate = CharState_IdleSneak;
else if (movestate != CharState_None && !isTurning())
idlestate = CharState_None;
else else
idlestate = CharState_Idle; idlestate = CharState_Idle;
} }