Fix crash if divine sprite is activated from the menu.

This commit is contained in:
Mari the Deer 2022-04-17 19:48:02 +02:00
commit 65e15bcab4
2 changed files with 3 additions and 3 deletions

View file

@ -34,7 +34,7 @@ extend Class SWWMHandler
{
PPShader.SetEnabled("DivineShader",true);
PPShader.SetUniform1f("DivineShader","timer",(gametic+e.FracTic)/GameTicRate);
double str = clamp((divi.AlphInter.GetValue()-1000.)/6000.,0.,1.)**2.;
double str = divi.AlphInter?(clamp((divi.AlphInter.GetValue()-1000.)/6000.,0.,1.)**2.):0.;
PPShader.SetUniform1f("DivineShader","str",str);
}
else PPShader.SetEnabled("DevastationShader",false);