diff options
Diffstat (limited to 'src/renderergl2')
-rw-r--r-- | src/renderergl2/tr_light.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/renderergl2/tr_light.c b/src/renderergl2/tr_light.c index 5993959e..ec54eab4 100644 --- a/src/renderergl2/tr_light.c +++ b/src/renderergl2/tr_light.c @@ -157,7 +157,7 @@ static void R_SetupEntityLightingGrid( trRefEntity_t *ent, world_t *world ) { frac[i] = v - pos[i]; if ( pos[i] < 0 ) { pos[i] = 0; - } else if ( pos[i] >= world->lightGridBounds[i] - 1 ) { + } else if ( pos[i] > world->lightGridBounds[i] - 1 ) { pos[i] = world->lightGridBounds[i] - 1; } } @@ -190,7 +190,7 @@ static void R_SetupEntityLightingGrid( trRefEntity_t *ent, world_t *world ) { ignore = qfalse; for ( j = 0 ; j < 3 ; j++ ) { if ( i & (1<<j) ) { - if ((pos[j] + 1) >= world->lightGridBounds[j] - 1) + if ((pos[j] + 1) > world->lightGridBounds[j] - 1) { ignore = qtrue; // ignore values outside lightgrid } |