From 84dcf59c50b21604c18ffc62078ea0f5d8499bd5 Mon Sep 17 00:00:00 2001 From: scrawl Date: Mon, 8 Feb 2016 22:57:34 +0100 Subject: [PATCH] Fix preloading of equipment parts that don't separate gender --- apps/openmw/mwclass/npc.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwclass/npc.cpp b/apps/openmw/mwclass/npc.cpp index 14bd0640c..5f7f91329 100644 --- a/apps/openmw/mwclass/npc.cpp +++ b/apps/openmw/mwclass/npc.cpp @@ -486,7 +486,9 @@ namespace MWClass for (std::vector::const_iterator it = parts.begin(); it != parts.end(); ++it) { - const std::string& partname = (npc->mBase->mFlags & ESM::NPC::Female) ? it->mFemale : it->mMale; + std::string partname = (npc->mBase->mFlags & ESM::NPC::Female) ? it->mFemale : it->mMale; + if (partname.empty()) + partname = (npc->mBase->mFlags & ESM::NPC::Female) ? it->mMale : it->mFemale; const ESM::BodyPart* part = MWBase::Environment::get().getWorld()->getStore().get().search(partname); if (part && !part->mModel.empty()) models.push_back("meshes/"+part->mModel);