mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 19:19:56 +00:00
Ensure forward-compatibility of death animations in old saves (fixes #4274)
This commit is contained in:
parent
b36bd75b59
commit
9abfabb065
1 changed files with 5 additions and 2 deletions
|
@ -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…
Reference in a new issue