From 8b72548e0448907f972c5b9b810cde2950ce1fac Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Sat, 14 Mar 2015 23:31:46 +0100 Subject: Fix a bug in Hummel's firing code. --- src/game/g_weapon.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/game/g_weapon.c') diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c index 58432d7..3a8c8ac 100644 --- a/src/game/g_weapon.c +++ b/src/game/g_weapon.c @@ -1837,7 +1837,7 @@ LEVEL5 void Prickles( gentity_t *ent ) { - vec3_t end; + vec3_t dir; float r; float u; @@ -1846,11 +1846,13 @@ void Prickles( gentity_t *ent ) r = random( ) * M_PI * 2.0f; u = sin( r ) * crandom( ) * LEVEL5_PRICKLES_SPREAD * 16; r = cos( r ) * crandom( ) * LEVEL5_PRICKLES_SPREAD * 16; - VectorMA( muzzle, 8192 * 16, forward, end ); - VectorMA( end, r, right, end ); - VectorMA( end, u, up, end ); - Prickles_Fire( ent, muzzle, end ); + VectorScale( forward, 8192 * 16, dir ); + VectorMA( dir, r, right, dir ); + VectorMA( dir, u, up, dir ); + VectorNormalize( dir ); + + Prickles_Fire( ent, muzzle, dir ); } -- cgit