Fix blinking wall light regression

This commit is contained in:
Magnus Norddahl 2017-02-02 18:46:21 +01:00
parent 7b4d9675c9
commit c219969b68

View file

@ -339,7 +339,8 @@ namespace swrenderer
double xmagnitude = 1.0; double xmagnitude = 1.0;
for (int x = x1; x < x2; x++, light += lightstep) float curlight = light;
for (int x = x1; x < x2; x++, curlight += lightstep)
{ {
int y1 = uwal[x]; int y1 = uwal[x];
int y2 = dwal[x]; int y2 = dwal[x];
@ -347,7 +348,7 @@ namespace swrenderer
continue; continue;
if (!fixed) if (!fixed)
drawerargs.SetLight(basecolormap, light, wallshade); drawerargs.SetLight(basecolormap, curlight, wallshade);
if (x + 1 < x2) xmagnitude = fabs(FIXED2DBL(lwal[x + 1]) - FIXED2DBL(lwal[x])); if (x + 1 < x2) xmagnitude = fabs(FIXED2DBL(lwal[x + 1]) - FIXED2DBL(lwal[x]));