From 56ef11b023299b64e6177c31a3af832b3b274d8c Mon Sep 17 00:00:00 2001 From: Capostrophic Date: Sun, 23 Sep 2018 13:55:49 +0300 Subject: [PATCH] Reset sneak and swim idle animations when moving --- apps/openmw/mwmechanics/character.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/openmw/mwmechanics/character.cpp b/apps/openmw/mwmechanics/character.cpp index 8f14e0331..c437a21d5 100644 --- a/apps/openmw/mwmechanics/character.cpp +++ b/apps/openmw/mwmechanics/character.cpp @@ -2168,12 +2168,12 @@ void CharacterController::update(float duration) if(mAnimQueue.empty() || inwater || sneak) { // Note: turning animations should not interrupt idle ones - if (inwater) + if (movestate != CharState_None && !isTurning()) + idlestate = CharState_None; + else if (inwater) idlestate = CharState_IdleSwim; else if (sneak && !inJump) idlestate = CharState_IdleSneak; - else if (movestate != CharState_None && !isTurning()) - idlestate = CharState_None; else idlestate = CharState_Idle; }