Simplify skyplane light selection

This commit is contained in:
Magnus Norddahl 2017-02-03 08:19:59 +01:00
parent 191438b238
commit a0a40281b3

View file

@ -147,7 +147,6 @@ namespace swrenderer
backpos = int(fmod(backdpos, sky2cyl * 65536.0)); backpos = int(fmod(backdpos, sky2cyl * 65536.0));
} }
bool fakefixed = false;
CameraLight *cameraLight = CameraLight::Instance(); CameraLight *cameraLight = CameraLight::Instance();
if (cameraLight->fixedcolormap) if (cameraLight->fixedcolormap)
{ {
@ -155,15 +154,10 @@ namespace swrenderer
} }
else else
{ {
fakefixed = true; drawerargs.SetLight(&NormalLight, 0, 0);
cameraLight->fixedcolormap = &NormalLight;
drawerargs.SetLight(cameraLight->fixedcolormap, 0, 0);
} }
DrawSky(pl); DrawSky(pl);
if (fakefixed)
cameraLight->fixedcolormap = nullptr;
} }
void RenderSkyPlane::DrawSkyColumnStripe(int start_x, int y1, int y2, double scale, double texturemid, double yrepeat) void RenderSkyPlane::DrawSkyColumnStripe(int start_x, int y1, int y2, double scale, double texturemid, double yrepeat)