[iortcw] 105/152: All: Copy hand.lightingOrigin after hand.origin is set up

Simon McVittie smcv at debian.org
Fri Sep 8 10:40:19 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 63faa5f59bfe53a99b06d4db89700392ace97354
Author: MAN-AT-ARMS <M4N4T4RMS at gmail.com>
Date:   Sun Sep 11 17:02:27 2016 -0400

    All: Copy hand.lightingOrigin after hand.origin is set up
---
 MP/code/cgame/cg_weapons.c | 5 +++--
 SP/code/cgame/cg_weapons.c | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/MP/code/cgame/cg_weapons.c b/MP/code/cgame/cg_weapons.c
index ca09617..1d3225c 100644
--- a/MP/code/cgame/cg_weapons.c
+++ b/MP/code/cgame/cg_weapons.c
@@ -2831,12 +2831,12 @@ void CG_AddViewWeapon( playerState_t *ps ) {
 		fovOffset[2] = -0.2 * ( cg_fov.integer - 90 );
  	}
 
+	memset( &hand, 0, sizeof( hand ) );
+
 	if ( ps->weapon > WP_NONE ) {
 		CG_RegisterWeapon( ps->weapon );
 		weapon = &cg_weapons[ ps->weapon ];
 
-		memset( &hand, 0, sizeof( hand ) );
-
 		// set up gun position
 		CG_CalculateWeaponPosition( hand.origin, angles );
 
@@ -2859,6 +2859,7 @@ void CG_AddViewWeapon( playerState_t *ps ) {
 			CG_WeaponAnimation( ps, weapon, &hand.oldframe, &hand.frame, &hand.backlerp );   //----(SA)	changed
 		}
 
+		VectorCopy( hand.origin, hand.lightingOrigin );
 
 		hand.hModel = weapon->handsModel;
 		hand.renderfx = RF_DEPTHHACK | RF_FIRST_PERSON | RF_MINLIGHT;   //----(SA)
diff --git a/SP/code/cgame/cg_weapons.c b/SP/code/cgame/cg_weapons.c
index 8e8a038..fc67e9f 100644
--- a/SP/code/cgame/cg_weapons.c
+++ b/SP/code/cgame/cg_weapons.c
@@ -3011,7 +3011,6 @@ void CG_AddViewWeapon( playerState_t *ps ) {
  	}
 
 	memset( &hand, 0, sizeof( hand ) );
-	VectorCopy( hand.origin, hand.lightingOrigin );
 
 	if ( ps->weapon > WP_NONE ) {
 		// DHM - Nerve :: handle WP_CLASS_SPECIAL for different classes
@@ -3062,6 +3061,7 @@ void CG_AddViewWeapon( playerState_t *ps ) {
 			CG_WeaponAnimation( ps, weapon, &hand.oldframe, &hand.frame, &hand.backlerp );   //----(SA)	changed
 		}
 
+		VectorCopy( hand.origin, hand.lightingOrigin );
 
 		hand.hModel = weapon->handsModel;
 		hand.renderfx = RF_DEPTHHACK | RF_FIRST_PERSON | RF_MINLIGHT;   //----(SA)

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