Ensure forward-compatibility of death animations in old saves (fixes #4274)

fix/skillcap
Capostrophic 7 years ago committed by GitHub
parent b36bd75b59
commit 9abfabb065
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -662,16 +662,19 @@ MWWorld::ContainerStoreIterator getActiveWeapon(CreatureStats &stats, MWWorld::I
void CharacterController::playDeath(float startpoint, CharacterState death)
{
// Make sure the character was swimming upon death for forward-compatibility
const bool wasSwimming = MWBase::Environment::get().getWorld()->isSwimming(mPtr);
switch (death)
{
case CharState_SwimDeath:
mCurrentDeath = "swimdeath";
break;
case CharState_SwimDeathKnockDown:
mCurrentDeath = "swimdeathknockdown";
mCurrentDeath = (wasSwimming ? "swimdeathknockdown" : "deathknockdown");
break;
case CharState_SwimDeathKnockOut:
mCurrentDeath = "swimdeathknockout";
mCurrentDeath = (wasSwimming ? "swimdeathknockout" : "deathknockout");
break;
case CharState_DeathKnockDown:
mCurrentDeath = "deathknockdown";

Loading…
Cancel
Save