1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-28 16:39:43 +00:00

Don't reset dead non-werewolf vampires' vampire NPC type

This commit is contained in:
Capostrophic 2020-03-25 21:06:21 +03:00
parent 8779d261ba
commit 3e3f5d66b2

View file

@ -269,6 +269,9 @@ void HeadAnimationTime::setBlinkStop(float value)
NpcAnimation::NpcType NpcAnimation::getNpcType()
{
const MWWorld::Class &cls = mPtr.getClass();
// Dead vampires should typically stay vampires.
if (mNpcType == Type_Vampire && cls.getNpcStats(mPtr).isDead() && !cls.getNpcStats(mPtr).isWerewolf())
return mNpcType;
NpcAnimation::NpcType curType = Type_Normal;
if (cls.getCreatureStats(mPtr).getMagicEffects().get(ESM::MagicEffect::Vampirism).getMagnitude() > 0)
curType = Type_Vampire;