light: fix minlight clamping for coloured lights

Colours need to be scaled correctly by the light intensity.
Thanks to Mechtech for reporting this issue.

Reported-by: Paul R <automan1001@yahoo.com>
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
This commit is contained in:
Kevin Shanahan 2014-02-15 18:56:44 +10:30
parent df9c82eb91
commit d68748d1d8
1 changed files with 2 additions and 2 deletions

View File

@ -684,8 +684,8 @@ Light_ClampMin(lightsample_t *sample, const vec_t light, const vec3_t color)
if (sample->light < light) {
sample->light = light;
for (i = 0; i < 3; i++)
if (sample->color[i] < color[i])
sample->color[i] = color[i];
if (sample->color[i] < color[i] * light / 255.0f)
sample->color[i] = color[i] * light / 255.0f;
}
}