1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 09:35:28 +00:00

Update shader with a non-color tracking material when equipment is changed during chameleon/invisibility effects (Fixes #4190)

This commit is contained in:
scrawl 2017-11-08 00:53:06 +01:00
parent e42bd71081
commit 95b3c1181a

View File

@ -388,9 +388,6 @@ void NpcAnimation::rebuild()
{
updateNpcBase();
if (mAlpha != 1.f)
mResourceSystem->getSceneManager()->recreateShaders(mObjectRoot);
MWBase::Environment::get().getMechanicsManager()->forceStateUpdate(mPtr);
}
@ -651,6 +648,9 @@ void NpcAnimation::updateParts()
if (wasArrowAttached)
attachArrow();
if (mAlpha != 1.f)
mResourceSystem->getSceneManager()->recreateShaders(mObjectRoot);
}
@ -917,6 +917,8 @@ void NpcAnimation::showWeapons(bool showWeapon)
attachArrow();
}
}
if (mAlpha != 1.f)
mResourceSystem->getSceneManager()->recreateShaders(mObjectRoot);
}
else
{
@ -942,6 +944,8 @@ void NpcAnimation::showCarriedLeft(bool show)
if (iter->getTypeName() == typeid(ESM::Light).name() && mObjectParts[ESM::PRT_Shield])
addExtraLight(mObjectParts[ESM::PRT_Shield]->getNode()->asGroup(), iter->get<ESM::Light>()->mBase);
}
if (mAlpha != 1.f)
mResourceSystem->getSceneManager()->recreateShaders(mObjectRoot);
}
else
removeIndividualPart(ESM::PRT_Shield);