diff options
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 ); } |