Recreate shaders if necessary when the NpcAnimation is rebuilt

This fixes certain equipment losing the 'invisibility' effect after a view-mode switch with shaders enabled. Because the initial build of shaders done by the resource manager is not aware of the override state in the NpcAnimation's object root, we have to build new shaders here.
This commit is contained in:
scrawl 2016-11-19 23:47:33 +01:00
parent e823cbf018
commit f51e06bc47

View file

@ -403,6 +403,9 @@ void NpcAnimation::rebuild()
{
updateNpcBase();
if (mAlpha != 1.f)
mResourceSystem->getSceneManager()->recreateShaders(mObjectRoot);
MWBase::Environment::get().getMechanicsManager()->forceStateUpdate(mPtr);
}