forked from mirror/openmw-tes3mp
Closes #1072: Fix extra light being added multiple times when showCarriedLeft(true) is called repeatedly
This commit is contained in:
parent
e6c0e187bc
commit
0990ca4b75
1 changed files with 6 additions and 5 deletions
|
@ -664,12 +664,13 @@ void NpcAnimation::showCarriedLeft(bool show)
|
|||
{
|
||||
Ogre::Vector3 glowColor = getEnchantmentColor(*iter);
|
||||
std::string mesh = MWWorld::Class::get(*iter).getModel(*iter);
|
||||
addOrReplaceIndividualPart(ESM::PRT_Shield, MWWorld::InventoryStore::Slot_CarriedLeft, 1,
|
||||
mesh, !iter->getClass().getEnchantment(*iter).empty(), &glowColor);
|
||||
|
||||
if (addOrReplaceIndividualPart(ESM::PRT_Shield, MWWorld::InventoryStore::Slot_CarriedLeft, 1,
|
||||
mesh, !iter->getClass().getEnchantment(*iter).empty(), &glowColor))
|
||||
{
|
||||
if (iter->getTypeName() == typeid(ESM::Light).name())
|
||||
addExtraLight(mInsert->getCreator(), mObjectParts[ESM::PRT_Shield], iter->get<ESM::Light>()->mBase);
|
||||
}
|
||||
}
|
||||
else
|
||||
removeIndividualPart(ESM::PRT_Shield);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue