From a5d7b36c28c706e7c52577991c5f180827a9cc8f Mon Sep 17 00:00:00 2001 From: scrawl Date: Thu, 23 Mar 2017 19:36:34 +0100 Subject: [PATCH] Don't clear idle animation when movement ends (Bug #3581) This caused problems when AiWander tried to start an idle animation in the frame after movement stops. --- apps/openmw/mwmechanics/character.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwmechanics/character.cpp b/apps/openmw/mwmechanics/character.cpp index 4b54098a1..62d481581 100644 --- a/apps/openmw/mwmechanics/character.cpp +++ b/apps/openmw/mwmechanics/character.cpp @@ -364,9 +364,11 @@ void CharacterController::refreshMovementAnims(const WeaponInfo* weap, Character { if(force || movement != mMovementState) { - mIdleState = CharState_None; mMovementState = movement; + if (movement != CharState_None) + mIdleState = CharState_None; + std::string movementAnimName; MWRender::Animation::BlendMask movemask = MWRender::Animation::BlendMask_All; const StateInfo *movestate = std::find_if(sMovementList, sMovementListEnd, FindCharState(mMovementState));