Merge pull request #2697 from Capostrophic/shield

Don't try to attach absent (empty path) shield models to NPCs
pull/2701/head
Andrei Kortunov 5 years ago committed by GitHub
commit 7d53c6274d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1011,9 +1011,11 @@ void NpcAnimation::showCarriedLeft(bool show)
if (!bodyparts.empty())
mesh = getShieldBodypartMesh(bodyparts, !mNpc->isMale());
}
if (addOrReplaceIndividualPart(ESM::PRT_Shield, MWWorld::InventoryStore::Slot_CarriedLeft, 1,
mesh, !iter->getClass().getEnchantment(*iter).empty(), &glowColor))
if (mesh.empty() || addOrReplaceIndividualPart(ESM::PRT_Shield, MWWorld::InventoryStore::Slot_CarriedLeft, 1,
mesh, !iter->getClass().getEnchantment(*iter).empty(), &glowColor))
{
if (mesh.empty())
reserveIndividualPart(ESM::PRT_Shield, MWWorld::InventoryStore::Slot_CarriedLeft, 1);
if (iter->getTypeName() == typeid(ESM::Light).name() && mObjectParts[ESM::PRT_Shield])
addExtraLight(mObjectParts[ESM::PRT_Shield]->getNode()->asGroup(), iter->get<ESM::Light>()->mBase);
}

Loading…
Cancel
Save