diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2015-03-14 23:31:46 +0100 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2015-03-14 23:31:46 +0100 |
commit | 8b72548e0448907f972c5b9b810cde2950ce1fac (patch) | |
tree | 01cfbd67a3e74681dc3b370b7b601b1ddcd7dd33 /src/game/g_weapon.c | |
parent | a3a89848ab31a43b174fb729c8af8117028ff7db (diff) |
Fix a bug in Hummel's firing code.
Diffstat (limited to 'src/game/g_weapon.c')
-rw-r--r-- | src/game/g_weapon.c | 12 |
1 files changed, 7 insertions, 5 deletions
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 ); } |