1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-30 09:15:38 +00:00

Merge pull request #2739 from Capostrophic/vampirism

Don't reset dead non-werewolf vampires' vampire NPC type (regression #5327)
This commit is contained in:
Bret Curtis 2020-03-26 08:02:16 +01:00 committed by GitHub
commit 4c5d2feee8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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;