diff options
Diffstat (limited to 'src/renderergl2')
-rw-r--r-- | src/renderergl2/tr_light.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/renderergl2/tr_light.c b/src/renderergl2/tr_light.c index ec54eab4..317f4585 100644 --- a/src/renderergl2/tr_light.c +++ b/src/renderergl2/tr_light.c @@ -181,18 +181,15 @@ static void R_SetupEntityLightingGrid( trRefEntity_t *ent, world_t *world ) { byte *data; int lat, lng; vec3_t normal; - qboolean ignore; #if idppc float d0, d1, d2, d3, d4, d5; #endif factor = 1.0; data = gridData; - ignore = qfalse; for ( j = 0 ; j < 3 ; j++ ) { if ( i & (1<<j) ) { - if ((pos[j] + 1) > world->lightGridBounds[j] - 1) - { - ignore = qtrue; // ignore values outside lightgrid + if ( pos[j] + 1 > world->lightGridBounds[j] - 1 ) { + break; // ignore values outside lightgrid } factor *= frac[j]; data += gridStep[j]; @@ -201,8 +198,9 @@ static void R_SetupEntityLightingGrid( trRefEntity_t *ent, world_t *world ) { } } - if ( ignore ) + if ( j != 3 ) { continue; + } if (world->hdrLightGrid) { |