From ecafcefae9efaab61d21f429f10be598ec178e21 Mon Sep 17 00:00:00 2001 From: Capostrophic <21265616+Capostrophic@users.noreply.github.com> Date: Sun, 24 Jun 2018 14:39:48 +0300 Subject: [PATCH 1/2] Fall back to regular head when getVampireHead fails --- apps/openmw/mwrender/npcanimation.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/openmw/mwrender/npcanimation.cpp b/apps/openmw/mwrender/npcanimation.cpp index 08e376f08..baf6cb822 100644 --- a/apps/openmw/mwrender/npcanimation.cpp +++ b/apps/openmw/mwrender/npcanimation.cpp @@ -416,6 +416,7 @@ void NpcAnimation::updateNpcBase() const ESM::Race *race = store.get().find(mNpc->mRace); bool isWerewolf = (mNpcType == Type_Werewolf); bool isVampire = (mNpcType == Type_Vampire); + bool isFemale = !mNpc->isMale(); if (isWerewolf) { @@ -425,8 +426,9 @@ void NpcAnimation::updateNpcBase() else { mHeadModel = ""; - if (isVampire) // FIXME: fall back to regular head when getVampireHead fails? - mHeadModel = getVampireHead(mNpc->mRace, mNpc->mFlags & ESM::NPC::Female); + const std::string& vampireHead = getVampireHead(mNpc->mRace, isFemale); + if (isVampire && !vampireHead.empty()) + mHeadModel = vampireHead; else if (!mNpc->mHead.empty()) { const ESM::BodyPart* bp = store.get().search(mNpc->mHead); @@ -448,7 +450,6 @@ void NpcAnimation::updateNpcBase() } bool isBeast = (race->mData.mFlags & ESM::Race::Beast) != 0; - bool isFemale = !mNpc->isMale(); std::string smodel; if (mViewMode != VM_FirstPerson) From d6a170f8483fd7cecc71b8cf12fb69207d1e457a Mon Sep 17 00:00:00 2001 From: Capostrophic <21265616+Capostrophic@users.noreply.github.com> Date: Sun, 24 Jun 2018 14:58:54 +0300 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 782a817e8..7276593a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,6 +49,7 @@ Bug #4461: "Open" spell from non-player caster isn't a crime Bug #4469: Abot Silt Striders – Model turn 90 degrees on horizontal Bug #4471: Retrieve SDL window settings instead of using magic numbers + Bug #4474: No fallback when getVampireHead fails Feature #3276: Editor: Search- Show number of (remaining) search results and indicate a search without any results Feature #4222: 360° screenshots Feature #4256: Implement ToggleBorders (TB) console command