[iortcw] 122/497: All: Rend2: Have Rend2 "map $lightmap" check for NULL tr.lightmaps too

Simon McVittie smcv at debian.org
Fri Sep 8 10:36:36 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 ffa7d9435d311fb1f4c81b39fc492c4e8da1eeba
Author: M4N4T4RMS at gmail.com <M4N4T4RMS at gmail.com@e65d2741-a53d-b2dc-ae96-bb75fa5e4c4a>
Date:   Mon May 26 10:25:15 2014 +0000

    All: Rend2: Have Rend2 "map $lightmap" check for NULL tr.lightmaps too
---
 MP/code/rend2/tr_shader.c | 2 +-
 SP/code/rend2/tr_shader.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/MP/code/rend2/tr_shader.c b/MP/code/rend2/tr_shader.c
index 6e2cc16..731ebf2 100644
--- a/MP/code/rend2/tr_shader.c
+++ b/MP/code/rend2/tr_shader.c
@@ -625,7 +625,7 @@ static qboolean ParseStage( shaderStage_t *stage, char **text ) {
 //----(SA) end
 			else if ( !Q_stricmp( token, "$lightmap" ) ) {
 				stage->bundle[0].isLightmap = qtrue;
-				if ( shader.lightmapIndex < 0 ) {
+				if ( shader.lightmapIndex < 0 || !tr.lightmaps ) {
 					stage->bundle[0].image[0] = tr.whiteImage;
 				} else {
 					stage->bundle[0].image[0] = tr.lightmaps[shader.lightmapIndex];
diff --git a/SP/code/rend2/tr_shader.c b/SP/code/rend2/tr_shader.c
index 4dea754..0fb7e6e 100644
--- a/SP/code/rend2/tr_shader.c
+++ b/SP/code/rend2/tr_shader.c
@@ -625,7 +625,7 @@ static qboolean ParseStage( shaderStage_t *stage, char **text ) {
 //----(SA) end
 			else if ( !Q_stricmp( token, "$lightmap" ) ) {
 				stage->bundle[0].isLightmap = qtrue;
-				if ( shader.lightmapIndex < 0 ) {
+				if ( shader.lightmapIndex < 0 || !tr.lightmaps ) {
 					stage->bundle[0].image[0] = tr.whiteImage;
 				} else {
 					stage->bundle[0].image[0] = tr.lightmaps[shader.lightmapIndex];

-- 
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