1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-19 17:09:40 +00:00

Fix broken swimdeath in first person

This commit is contained in:
scrawl 2014-06-18 15:33:09 +02:00
parent 224163e5a2
commit 9a6737073f

View file

@ -409,13 +409,6 @@ MWWorld::ContainerStoreIterator getActiveWeapon(CreatureStats &stats, MWWorld::I
void CharacterController::playDeath(float startpoint, CharacterState death)
{
if (mPtr == MWBase::Environment::get().getWorld()->getPlayerPtr())
{
// The first-person animations do not include death, so we need to
// force-switch to third person before playing the death animation.
MWBase::Environment::get().getWorld()->useDeathCamera();
}
switch (death)
{
case CharState_SwimDeath:
@ -459,6 +452,13 @@ void CharacterController::playDeath(float startpoint, CharacterState death)
void CharacterController::playRandomDeath(float startpoint)
{
if (mPtr == MWBase::Environment::get().getWorld()->getPlayerPtr())
{
// The first-person animations do not include death, so we need to
// force-switch to third person before playing the death animation.
MWBase::Environment::get().getWorld()->useDeathCamera();
}
if(MWBase::Environment::get().getWorld()->isSwimming(mPtr) && mAnimation->hasAnimation("swimdeath"))
{
mDeathState = CharState_SwimDeath;