[iortcw] 361/497: All: Fix ignoring last light grid point on each axis

Simon McVittie smcv at debian.org
Fri Sep 8 10:37:28 UTC 2017


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to annotated tag 1.42d
in repository iortcw.

commit b73a090b3468239eae1e6c1ec150aa4a88af00fa
Author: Donny <M4N4T4RMS at gmail.com>
Date:   Mon Jul 13 06:43:00 2015 -0400

    All: Fix ignoring last light grid point on each axis
---
 MP/code/rend2/tr_light.c    | 4 ++--
 MP/code/renderer/tr_light.c | 2 +-
 SP/code/rend2/tr_light.c    | 4 ++--
 SP/code/renderer/tr_light.c | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/MP/code/rend2/tr_light.c b/MP/code/rend2/tr_light.c
index 09240d1..b88ffee 100644
--- a/MP/code/rend2/tr_light.c
+++ b/MP/code/rend2/tr_light.c
@@ -171,7 +171,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;
 		}
 	}
@@ -201,7 +201,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
 				}
diff --git a/MP/code/renderer/tr_light.c b/MP/code/renderer/tr_light.c
index b8ac166..68e3625 100644
--- a/MP/code/renderer/tr_light.c
+++ b/MP/code/renderer/tr_light.c
@@ -166,7 +166,7 @@ static void R_SetupEntityLightingGrid( trRefEntity_t *ent ) {
 		frac[i] = v - pos[i];
 		if ( pos[i] < 0 ) {
 			pos[i] = 0;
-		} else if ( pos[i] >= tr.world->lightGridBounds[i] - 1 ) {
+		} else if ( pos[i] > tr.world->lightGridBounds[i] - 1 ) {
 			pos[i] = tr.world->lightGridBounds[i] - 1;
 		}
 	}
diff --git a/SP/code/rend2/tr_light.c b/SP/code/rend2/tr_light.c
index e622dff..1d3df03 100644
--- a/SP/code/rend2/tr_light.c
+++ b/SP/code/rend2/tr_light.c
@@ -171,7 +171,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;
 		}
 	}
@@ -202,7 +202,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
 				}
diff --git a/SP/code/renderer/tr_light.c b/SP/code/renderer/tr_light.c
index 32b3100..89841d8 100644
--- a/SP/code/renderer/tr_light.c
+++ b/SP/code/renderer/tr_light.c
@@ -166,7 +166,7 @@ static void R_SetupEntityLightingGrid( trRefEntity_t *ent ) {
 		frac[i] = v - pos[i];
 		if ( pos[i] < 0 ) {
 			pos[i] = 0;
-		} else if ( pos[i] >= tr.world->lightGridBounds[i] - 1 ) {
+		} else if ( pos[i] > tr.world->lightGridBounds[i] - 1 ) {
 			pos[i] = tr.world->lightGridBounds[i] - 1;
 		}
 	}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/iortcw.git



More information about the Pkg-games-commits mailing list