1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-03-29 18:06:42 +00:00

Fix VFX not getting removed when an actor dies

This commit is contained in:
scrawl 2013-11-14 14:52:30 +01:00
parent e26cc31e3b
commit 9c5847e2f4

View file

@ -1114,7 +1114,8 @@ void CharacterController::updateContinuousVfx()
for (std::vector<int>::iterator it = effects.begin(); it != effects.end(); ++it) for (std::vector<int>::iterator it = effects.begin(); it != effects.end(); ++it)
{ {
if (mPtr.getClass().getCreatureStats(mPtr).getMagicEffects().get(MWMechanics::EffectKey(*it)).mMagnitude <= 0) if (mPtr.getClass().getCreatureStats(mPtr).isDead()
|| mPtr.getClass().getCreatureStats(mPtr).getMagicEffects().get(MWMechanics::EffectKey(*it)).mMagnitude <= 0)
mAnimation->removeEffect(*it); mAnimation->removeEffect(*it);
} }
} }