From 2daecc633e758ef03118f8a2449f5c98e6804cc6 Mon Sep 17 00:00:00 2001 From: Alexei Dobrohotov Date: Wed, 4 Sep 2019 16:42:34 +0300 Subject: [PATCH] Revert Vampirism behavior upon death to 0.45.0-like state Until we figure out the better way to handle vampire stuff tangled together with post-death animation magic effect reset. --- apps/openmw/mwmechanics/character.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/apps/openmw/mwmechanics/character.cpp b/apps/openmw/mwmechanics/character.cpp index 1b5c193c4..9b6c1e0c3 100644 --- a/apps/openmw/mwmechanics/character.cpp +++ b/apps/openmw/mwmechanics/character.cpp @@ -2580,11 +2580,15 @@ void CharacterController::updateMagicEffects() if (!mPtr.getClass().isActor()) return; - bool vampire = mPtr.getClass().getCreatureStats(mPtr).getMagicEffects().get(ESM::MagicEffect::Vampirism).getMagnitude() > 0.0f; - mAnimation->setVampire(vampire); - float light = mPtr.getClass().getCreatureStats(mPtr).getMagicEffects().get(ESM::MagicEffect::Light).getMagnitude(); mAnimation->setLightEffect(light); + + // If you're dead you don't care about whether you've started/stopped being a vampire or not + if (mPtr.getClass().getCreatureStats(mPtr).isDead()) + return; + + bool vampire = mPtr.getClass().getCreatureStats(mPtr).getMagicEffects().get(ESM::MagicEffect::Vampirism).getMagnitude() > 0.0f; + mAnimation->setVampire(vampire); } void CharacterController::setVisibility(float visibility)