From cbc9d34954649fd413b25283c6e5b397bbfc2b56 Mon Sep 17 00:00:00 2001 From: Jeff Teunissen Date: Tue, 26 Sep 2000 16:15:57 +0000 Subject: [PATCH] Back out Chris Ison's patch, make another change for readability (in this case, 255 << 8 is more readable than 255*256, and was the intent anyway) --- source/gl_rsurf.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/source/gl_rsurf.c b/source/gl_rsurf.c index 8d2b63b..5e9cd49 100644 --- a/source/gl_rsurf.c +++ b/source/gl_rsurf.c @@ -254,15 +254,23 @@ R_BuildLightMap (msurface_t *surf, byte *dest, int stride) if (!cl.worldmodel->lightdata) { bl = blocklights; for (i=0 ; istyles[maps] != 255; @@ -271,17 +279,11 @@ R_BuildLightMap (msurface_t *surf, byte *dest, int stride) surf->cached_light[maps] = scale; // 8.8 fraction bl = blocklights; for (i = 0; i < size; i++) { - *bl++ = *lightmap++ * scale; - *bl++ = *lightmap++ * scale; - *bl++ = *lightmap++ * scale; + *bl++ += *lightmap++ * scale; + *bl++ += *lightmap++ * scale; + *bl++ += *lightmap++ * scale; } } - } else { - for (i = 0; i < size; i++) { - *bl++ = 0; - *bl++ = 0; - *bl++ = 0; - } } // add all the dynamic lights