From 365ca6c7e1b6208fc323f1fc29db8c4747bb6ee4 Mon Sep 17 00:00:00 2001 From: scrawl Date: Tue, 13 May 2014 21:42:27 +0200 Subject: [PATCH] Fixes #1331: Manually disable movement state for dead actors. For dead actors, refreshCurrentAnims is no longer called, so we need to disable the movement state manually. --- apps/openmw/mwmechanics/character.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/openmw/mwmechanics/character.cpp b/apps/openmw/mwmechanics/character.cpp index 280639f71..2b8b6eccb 100644 --- a/apps/openmw/mwmechanics/character.cpp +++ b/apps/openmw/mwmechanics/character.cpp @@ -431,6 +431,11 @@ void CharacterController::playRandomDeath(float startpoint) mDeathState = static_cast(CharState_Death1 + (selected-1)); } + // For dead actors, refreshCurrentAnims is no longer called, so we need to disable the movement state manually. + mMovementState = CharState_None; + mAnimation->disable(mCurrentMovement); + mCurrentMovement = ""; + mAnimation->play(mCurrentDeath, Priority_Death, MWRender::Animation::Group_All, false, 1.0f, "start", "stop", startpoint, 0); }