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.
pull/106/head
scrawl 8 years ago
parent e823cbf018
commit f51e06bc47

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

Loading…
Cancel
Save