[quake3-commits] r1901 - trunk/code/cgame

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Fri Mar 4 15:20:44 EST 2011


Author: thilo
Date: 2011-03-04 15:20:43 -0500 (Fri, 04 Mar 2011)
New Revision: 1901

Modified:
   trunk/code/cgame/cg_weapons.c
Log:
Patch by Zack Middleton (#4920)


Modified: trunk/code/cgame/cg_weapons.c
===================================================================
--- trunk/code/cgame/cg_weapons.c	2011-02-23 18:09:17 UTC (rev 1900)
+++ trunk/code/cgame/cg_weapons.c	2011-03-04 20:20:43 UTC (rev 1901)
@@ -982,6 +982,7 @@
 	refEntity_t  beam;
 	vec3_t   forward;
 	vec3_t   muzzlePoint, endPoint;
+	int      anim;
 
 	if (cent->currentState.weapon != WP_LIGHTNING) {
 		return;
@@ -1021,8 +1022,12 @@
 		VectorCopy(cent->lerpOrigin, muzzlePoint );
 	}
 
-	// FIXME: crouch
-	muzzlePoint[2] += DEFAULT_VIEWHEIGHT;
+	anim = cent->currentState.legsAnim & ~ANIM_TOGGLEBIT;
+	if ( anim == LEGS_WALKCR || anim == LEGS_IDLECR ) {
+		muzzlePoint[2] += CROUCH_VIEWHEIGHT;
+	} else {
+		muzzlePoint[2] += DEFAULT_VIEWHEIGHT;
+	}
 
 	VectorMA( muzzlePoint, 14, forward, muzzlePoint );
 



More information about the quake3-commits mailing list