[iortcw] 52/152: MP: Fix cg_crosshairHealth

Simon McVittie smcv at debian.org
Fri Sep 8 10:39:58 UTC 2017


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

smcv pushed a commit to annotated tag 1.5a
in repository iortcw.

commit 692a4875cfc9d510c524c006c3848749c294cdf4
Author: MAN-AT-ARMS <M4N4T4RMS at gmail.com>
Date:   Mon May 9 04:31:30 2016 -0400

    MP: Fix cg_crosshairHealth
---
 MP/code/rend2/tr_shader.c    | 6 ++++++
 MP/code/renderer/tr_shader.c | 6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/MP/code/rend2/tr_shader.c b/MP/code/rend2/tr_shader.c
index f0b9e08..e6abba6 100644
--- a/MP/code/rend2/tr_shader.c
+++ b/MP/code/rend2/tr_shader.c
@@ -1291,6 +1291,12 @@ static qboolean ParseStage( shaderStage_t *stage, char **text ) {
 		}
 	}
 
+	// allow crosshairs to be colorized for cg_crosshairHealth
+	if ( strstr( shader.name, "crosshair" ) && shader.lightmapIndex == LIGHTMAP_2D ) {
+		if ( stage->rgbGen == CGEN_IDENTITY || stage->rgbGen == CGEN_IDENTITY_LIGHTING ) {
+			stage->rgbGen = CGEN_VERTEX;
+		}
+	}
 
 	//
 	// implicitly assume that a GL_ONE GL_ZERO blend mask disables blending
diff --git a/MP/code/renderer/tr_shader.c b/MP/code/renderer/tr_shader.c
index eb16488..c6564e3 100644
--- a/MP/code/renderer/tr_shader.c
+++ b/MP/code/renderer/tr_shader.c
@@ -989,6 +989,12 @@ static qboolean ParseStage( shaderStage_t *stage, char **text ) {
 		}
 	}
 
+	// allow crosshairs to be colorized for cg_crosshairHealth
+	if ( strstr( shader.name, "crosshair" ) && shader.lightmapIndex == LIGHTMAP_2D ) {
+		if ( stage->rgbGen == CGEN_IDENTITY || stage->rgbGen == CGEN_IDENTITY_LIGHTING ) {
+			stage->rgbGen = CGEN_VERTEX;
+		}
+	}
 
 	//
 	// implicitly assume that a GL_ONE GL_ZERO blend mask disables blending

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