diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index d5c789368..b50e05e61 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -533,10 +533,8 @@ void HWR_Lighting(FSurfaceInfo *Surface, INT32 light_level, extracolormap_t *col poly_color.s.blue = (UINT8)blue; } - light_level = SOFTLIGHT(light_level); - // Clamp the light level, since it can sometimes go out of the 0-255 range from animations - light_level = min(max(light_level, cv_secbright.value), 255); + light_level = CLAMP(SOFTLIGHT(light_level), cv_secbright.value, 255); // in palette rendering mode, this is not needed since it properly takes the changes to the palette itself if (!HWR_ShouldUsePaletteRendering())