From 5baf239a6df5a04f50a575316099e4774cbd3cb6 Mon Sep 17 00:00:00 2001 From: Spoike Date: Tue, 21 Dec 2004 04:34:58 +0000 Subject: [PATCH] Tiny speedup. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@668 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/gl/gl_rsurf.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/engine/gl/gl_rsurf.c b/engine/gl/gl_rsurf.c index d53bd5e56..29cedc2ef 100644 --- a/engine/gl/gl_rsurf.c +++ b/engine/gl/gl_rsurf.c @@ -881,15 +881,27 @@ void GLR_BuildLightMap (msurface_t *surf, qbyte *dest, qbyte *deluxdest, stmap * surf->cached_light[maps] = scale; // 8.8 fraction surf->cached_colour[maps] = cl_lightstyle[surf->styles[maps]].colour; - if (cl_lightstyle[surf->styles[maps]].colour & 1) + if (cl_lightstyle[surf->styles[maps]].colour == 7) //hopefully a faster alternative. + { for (i=0 ; istyles[maps]].colour & 2) - for (i=0 ; istyles[maps]].colour & 4) - for (i=0 ; istyles[maps]].colour & 1) + for (i=0 ; istyles[maps]].colour & 2) + for (i=0 ; istyles[maps]].colour & 4) + for (i=0 ; i