1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 19:19:56 +00:00

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.
This commit is contained in:
Alexei Dobrohotov 2019-09-04 16:42:34 +03:00 committed by GitHub
parent 0caf192212
commit 2daecc633e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)