[iortcw] 14/152: All: Simplify 061060d
Simon McVittie
smcv at debian.org
Fri Sep 8 10:39:39 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 ee9f8e842388fc47844ee99045c7723b5867497f
Author: MAN-AT-ARMS <M4N4T4RMS at gmail.com>
Date: Mon Jan 18 05:00:20 2016 -0500
All: Simplify 061060d
---
MP/code/renderer/tr_shade_calc.c | 6 +-----
SP/code/renderer/tr_shade_calc.c | 6 +-----
2 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/MP/code/renderer/tr_shade_calc.c b/MP/code/renderer/tr_shade_calc.c
index 7cd1e05..abe25d5 100644
--- a/MP/code/renderer/tr_shade_calc.c
+++ b/MP/code/renderer/tr_shade_calc.c
@@ -1260,11 +1260,7 @@ static void RB_CalcDiffuseColor_scalar( unsigned char *colors )
for (i = 0 ; i < numVertexes ; i++, v += 4, normal += 4) {
incoming = DotProduct (normal, lightDir);
if ( incoming <= 0 ) {
- colors[i * 4 + 0] = ri.ftol( ent->ambientLight[0] );
- colors[i * 4 + 1] = ri.ftol( ent->ambientLight[1] );
- colors[i * 4 + 2] = ri.ftol( ent->ambientLight[2] );
- colors[i * 4 + 3] = 255;
- continue;
+ incoming = 0.0;
}
j = ri.ftol(ambientLight[0] + incoming * directedLight[0]);
if ( j > 255 ) {
diff --git a/SP/code/renderer/tr_shade_calc.c b/SP/code/renderer/tr_shade_calc.c
index 5daebec..a1854b7 100644
--- a/SP/code/renderer/tr_shade_calc.c
+++ b/SP/code/renderer/tr_shade_calc.c
@@ -1266,11 +1266,7 @@ static void RB_CalcDiffuseColor_scalar( unsigned char *colors )
for (i = 0 ; i < numVertexes ; i++, v += 4, normal += 4) {
incoming = DotProduct (normal, lightDir);
if ( incoming <= 0 ) {
- colors[i * 4 + 0] = ri.ftol( ent->ambientLight[0] );
- colors[i * 4 + 1] = ri.ftol( ent->ambientLight[1] );
- colors[i * 4 + 2] = ri.ftol( ent->ambientLight[2] );
- colors[i * 4 + 3] = 255;
- continue;
+ incoming = 0.0;
}
j = ri.ftol( ambientLight[0] + incoming * directedLight[0] );
if ( j > 255 ) {
--
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