Skip to content

Commit

Permalink
Patch by Zack Middleton (#4920)
Browse files Browse the repository at this point in the history
  • Loading branch information
Thilo Schulz committed Mar 4, 2011
1 parent 34e0a6c commit b1f861b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions code/cgame/cg_weapons.c
Original file line number Diff line number Diff line change
Expand Up @@ -982,6 +982,7 @@ static void CG_LightningBolt( centity_t *cent, vec3_t origin ) {
refEntity_t beam;
vec3_t forward;
vec3_t muzzlePoint, endPoint;
int anim;

if (cent->currentState.weapon != WP_LIGHTNING) {
return;
Expand Down Expand Up @@ -1021,8 +1022,12 @@ static void CG_LightningBolt( centity_t *cent, vec3_t origin ) {
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 );

Expand Down

0 comments on commit b1f861b

Please sign in to comment.