Patch by Zack Middleton (#4920)

This commit is contained in:
Thilo Schulz 2011-03-04 20:20:43 +00:00
parent 34e0a6c6f6
commit b1f861b8da

View file

@ -982,6 +982,7 @@ static void CG_LightningBolt( centity_t *cent, vec3_t origin ) {
refEntity_t beam; refEntity_t beam;
vec3_t forward; vec3_t forward;
vec3_t muzzlePoint, endPoint; vec3_t muzzlePoint, endPoint;
int anim;
if (cent->currentState.weapon != WP_LIGHTNING) { if (cent->currentState.weapon != WP_LIGHTNING) {
return; return;
@ -1021,8 +1022,12 @@ static void CG_LightningBolt( centity_t *cent, vec3_t origin ) {
VectorCopy(cent->lerpOrigin, muzzlePoint ); VectorCopy(cent->lerpOrigin, muzzlePoint );
} }
// FIXME: crouch anim = cent->currentState.legsAnim & ~ANIM_TOGGLEBIT;
muzzlePoint[2] += DEFAULT_VIEWHEIGHT; if ( anim == LEGS_WALKCR || anim == LEGS_IDLECR ) {
muzzlePoint[2] += CROUCH_VIEWHEIGHT;
} else {
muzzlePoint[2] += DEFAULT_VIEWHEIGHT;
}
VectorMA( muzzlePoint, 14, forward, muzzlePoint ); VectorMA( muzzlePoint, 14, forward, muzzlePoint );