mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-07 12:54:00 +00:00
Don't try to attach absent shield models to NPCs
This commit is contained in:
parent
54e7e0c718
commit
fcbd3b4324
@ -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…
Reference in New Issue
Block a user