Convert r_actualextralight global to a function

This commit is contained in:
Magnus Norddahl 2017-01-12 19:09:13 +01:00
commit f912b4ab8b
9 changed files with 19 additions and 23 deletions

View file

@ -174,7 +174,7 @@ namespace swrenderer
rereadcolormap = false;
}
int shade = LIGHT2SHADE(spr->sector->lightlevel + r_actualextralight);
int shade = LIGHT2SHADE(spr->sector->lightlevel + R_ActualExtraLight(foggy));
double GlobVis = r_WallVisibility;
float lightleft = float(GlobVis / spr->wallc.sz1);
float lightstep = float((GlobVis / spr->wallc.sz2 - lightleft) / (spr->wallc.sx2 - spr->wallc.sx1));