Fall back to regular death animation if deathknockdown/deathknockout don't exist (Fixes #1870)

deque
scrawl 10 years ago
parent 819234cdfe
commit 84a0d064cd

@ -557,11 +557,11 @@ void CharacterController::playRandomDeath(float startpoint)
{ {
mDeathState = CharState_SwimDeath; mDeathState = CharState_SwimDeath;
} }
else if (mHitState == CharState_KnockDown) else if (mHitState == CharState_KnockDown && mAnimation->hasAnimation("deathknockdown"))
{ {
mDeathState = CharState_DeathKnockDown; mDeathState = CharState_DeathKnockDown;
} }
else if (mHitState == CharState_KnockOut) else if (mHitState == CharState_KnockOut && mAnimation->hasAnimation("deathknockout"))
{ {
mDeathState = CharState_DeathKnockOut; mDeathState = CharState_DeathKnockOut;
} }

Loading…
Cancel
Save