mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-13 21:40:11 +00:00
Closes #1072: Fix extra light being added multiple times when showCarriedLeft(true) is called repeatedly
This commit is contained in:
parent
e6c0e187bc
commit
0990ca4b75
@ -664,11 +664,12 @@ void NpcAnimation::showCarriedLeft(bool show)
|
|||||||
{
|
{
|
||||||
Ogre::Vector3 glowColor = getEnchantmentColor(*iter);
|
Ogre::Vector3 glowColor = getEnchantmentColor(*iter);
|
||||||
std::string mesh = MWWorld::Class::get(*iter).getModel(*iter);
|
std::string mesh = MWWorld::Class::get(*iter).getModel(*iter);
|
||||||
addOrReplaceIndividualPart(ESM::PRT_Shield, MWWorld::InventoryStore::Slot_CarriedLeft, 1,
|
if (addOrReplaceIndividualPart(ESM::PRT_Shield, MWWorld::InventoryStore::Slot_CarriedLeft, 1,
|
||||||
mesh, !iter->getClass().getEnchantment(*iter).empty(), &glowColor);
|
mesh, !iter->getClass().getEnchantment(*iter).empty(), &glowColor))
|
||||||
|
{
|
||||||
if (iter->getTypeName() == typeid(ESM::Light).name())
|
if (iter->getTypeName() == typeid(ESM::Light).name())
|
||||||
addExtraLight(mInsert->getCreator(), mObjectParts[ESM::PRT_Shield], iter->get<ESM::Light>()->mBase);
|
addExtraLight(mInsert->getCreator(), mObjectParts[ESM::PRT_Shield], iter->get<ESM::Light>()->mBase);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
removeIndividualPart(ESM::PRT_Shield);
|
removeIndividualPart(ESM::PRT_Shield);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user