mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-20 06:53:52 +00:00
Merge pull request #2697 from Capostrophic/shield
Don't try to attach absent (empty path) shield models to NPCs
This commit is contained in:
commit
7d53c6274d
1 changed files with 4 additions and 2 deletions
|
@ -1011,9 +1011,11 @@ void NpcAnimation::showCarriedLeft(bool show)
|
||||||
if (!bodyparts.empty())
|
if (!bodyparts.empty())
|
||||||
mesh = getShieldBodypartMesh(bodyparts, !mNpc->isMale());
|
mesh = getShieldBodypartMesh(bodyparts, !mNpc->isMale());
|
||||||
}
|
}
|
||||||
if (addOrReplaceIndividualPart(ESM::PRT_Shield, MWWorld::InventoryStore::Slot_CarriedLeft, 1,
|
if (mesh.empty() || addOrReplaceIndividualPart(ESM::PRT_Shield, MWWorld::InventoryStore::Slot_CarriedLeft, 1,
|
||||||
mesh, !iter->getClass().getEnchantment(*iter).empty(), &glowColor))
|
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])
|
if (iter->getTypeName() == typeid(ESM::Light).name() && mObjectParts[ESM::PRT_Shield])
|
||||||
addExtraLight(mObjectParts[ESM::PRT_Shield]->getNode()->asGroup(), iter->get<ESM::Light>()->mBase);
|
addExtraLight(mObjectParts[ESM::PRT_Shield]->getNode()->asGroup(), iter->get<ESM::Light>()->mBase);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue