Fix drawing dormant lights

This commit is contained in:
Magnus Norddahl 2016-12-21 18:38:01 +01:00
parent 4e56c9a41a
commit 62716c3d91

View file

@ -560,6 +560,8 @@ static void Draw1Column(int x, int y1, int y2, WallSampler &sampler, void(*draw1
dc_lights = lightbuffer + nextlightindex;
FLightNode *cur_node = dc_light_list;
while (cur_node && nextlightindex < 64 * 1024)
{
if (!(cur_node->lightsource->flags2&MF2_DORMANT))
{
uint32_t red = cur_node->lightsource->GetRed();
uint32_t green = cur_node->lightsource->GetGreen();
@ -579,6 +581,7 @@ static void Draw1Column(int x, int y1, int y2, WallSampler &sampler, void(*draw1
// Precalculate the constant part of the dot here so the drawer doesn't have to.
light.x = light.x * light.x + light.y * light.y;
}
cur_node = cur_node->nextLight;
}