1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-22 20:53:53 +00:00

Do not interrupt scripted animations by death animation (bug #4286)

This commit is contained in:
Andrei Kortunov 2018-06-11 18:53:25 +04:00
parent d0619cfb35
commit a42c663fd7

View file

@ -728,6 +728,14 @@ void CharacterController::playRandomDeath(float startpoint)
MWBase::Environment::get().getWorld()->useDeathCamera();
}
// Do not interrupt scripted animation by death
if (!mAnimQueue.empty())
{
AnimationQueueEntry& first = mAnimQueue.front();
if (first.mPersist && isAnimPlaying(first.mGroup))
return;
}
if(mHitState == CharState_SwimKnockDown && mAnimation->hasAnimation("swimdeathknockdown"))
{
mDeathState = CharState_SwimDeathKnockDown;