From c9756cee4cbb346cd2259471972038581fa71bbb Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Wed, 20 Jun 2018 12:37:58 +0400 Subject: [PATCH] Fast-forward death animation to end if death animation was finished earlier (regression #4468) --- apps/openmw/mwmechanics/character.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/openmw/mwmechanics/character.cpp b/apps/openmw/mwmechanics/character.cpp index fbdb19d5b..e2df546cd 100644 --- a/apps/openmw/mwmechanics/character.cpp +++ b/apps/openmw/mwmechanics/character.cpp @@ -2026,10 +2026,11 @@ void CharacterController::update(float duration) { // initial start of death animation for actors that started the game as dead // not done in constructor since we need to give scripts a chance to set the mSkipAnim flag - if (!mSkipAnim && mDeathState != CharState_None && mCurrentDeath.empty() && cls.isPersistent(mPtr)) + if (!mSkipAnim && mDeathState != CharState_None && mCurrentDeath.empty()) { - // Fast-forward death animation to end for persisting corpses - playDeath(1.f, mDeathState); + // Fast-forward death animation to end for persisting corpses or corpses after end of death animation + if (cls.isPersistent(mPtr) || cls.getCreatureStats(mPtr).isDeathAnimationFinished()) + playDeath(1.f, mDeathState); } // We must always queue movement, even if there is none, to apply gravity. world->queueMovement(mPtr, osg::Vec3f(0.f, 0.f, 0.f));