Tiny speedup.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@668 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
26a1533f97
commit
5baf239a6d
1 changed files with 20 additions and 8 deletions
|
@ -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 ; i<size ; i++)
|
||||
blocklights[i] += lightmap[i] * scale;
|
||||
if (cl_lightstyle[surf->styles[maps]].colour & 2)
|
||||
for (i=0 ; i<size ; i++)
|
||||
greenblklights[i] += lightmap[i] * scale;
|
||||
if (cl_lightstyle[surf->styles[maps]].colour & 4)
|
||||
for (i=0 ; i<size ; i++)
|
||||
blueblklights[i] += lightmap[i] * scale;
|
||||
{
|
||||
blocklights[i] += lightmap[i] * scale;
|
||||
greenblklights[i] += lightmap[i] * scale;
|
||||
blueblklights[i] += lightmap[i] * scale;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (cl_lightstyle[surf->styles[maps]].colour & 1)
|
||||
for (i=0 ; i<size ; i++)
|
||||
blocklights[i] += lightmap[i] * scale;
|
||||
if (cl_lightstyle[surf->styles[maps]].colour & 2)
|
||||
for (i=0 ; i<size ; i++)
|
||||
greenblklights[i] += lightmap[i] * scale;
|
||||
if (cl_lightstyle[surf->styles[maps]].colour & 4)
|
||||
for (i=0 ; i<size ; i++)
|
||||
blueblklights[i] += lightmap[i] * scale;
|
||||
}
|
||||
lightmap += size; // skip to next lightmap
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue