1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-03 20:45:33 +00:00

Fast-forward death animation to end if death animation was finished earlier (regression #4468)

This commit is contained in:
Andrei Kortunov 2018-06-20 12:37:58 +04:00
parent f3923a41c0
commit c9756cee4c

View file

@ -2026,9 +2026,10 @@ void CharacterController::update(float duration)
{ {
// initial start of death animation for actors that started the game as dead // 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 // 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 // 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); playDeath(1.f, mDeathState);
} }
// We must always queue movement, even if there is none, to apply gravity. // We must always queue movement, even if there is none, to apply gravity.