Unbreak swimdeath fallback

This commit is contained in:
Evil Eye 2025-07-19 09:38:44 +02:00
parent 1dfa2629f0
commit 39cc893639
2 changed files with 7 additions and 9 deletions

View File

@ -80,7 +80,6 @@
Bug #4754: Stack of ammunition cannot be equipped partially Bug #4754: Stack of ammunition cannot be equipped partially
Bug #4816: GetWeaponDrawn returns 1 before weapon is attached Bug #4816: GetWeaponDrawn returns 1 before weapon is attached
Bug #4822: Non-weapon equipment and body parts can't inherit time from parent animation Bug #4822: Non-weapon equipment and body parts can't inherit time from parent animation
Bug #4885: Disable in dialogue result script causes a crash
Bug #4898: Odd/Incorrect lighting on meshes Bug #4898: Odd/Incorrect lighting on meshes
Bug #5057: Weapon swing sound plays at same pitch whether it hits or misses Bug #5057: Weapon swing sound plays at same pitch whether it hits or misses
Bug #5062: Root bone rotations for NPC animation don't work the same as for creature animation Bug #5062: Root bone rotations for NPC animation don't work the same as for creature animation

View File

@ -883,13 +883,12 @@ namespace MWMechanics
} }
mDeathState = hitStateToDeathState(mHitState); mDeathState = hitStateToDeathState(mHitState);
if (mDeathState == CharState_None) if (mDeathState == CharState_None && MWBase::Environment::get().getWorld()->isSwimming(mPtr))
{
if (MWBase::Environment::get().getWorld()->isSwimming(mPtr))
mDeathState = CharState_SwimDeath; mDeathState = CharState_SwimDeath;
else if (mAnimation && !mAnimation->hasAnimation(deathStateToAnimGroup(mDeathState)))
if (mDeathState == CharState_None
|| (mAnimation && !mAnimation->hasAnimation(deathStateToAnimGroup(mDeathState))))
mDeathState = chooseRandomDeathState(); mDeathState = chooseRandomDeathState();
}
// Do not interrupt scripted animation by death // Do not interrupt scripted animation by death
if (!mAnimation || isScriptedAnimPlaying()) if (!mAnimation || isScriptedAnimPlaying())