summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/bg_pmove.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c
index 224cf0c1..cf80bc5f 100644
--- a/src/game/bg_pmove.c
+++ b/src/game/bg_pmove.c
@@ -2866,9 +2866,11 @@ static void PM_Weapon( void )
AngleVectors( pm->ps->viewangles, dir, NULL, NULL );
VectorCopy( pm->ps->velocity, vel );
- VectorNormalize( vel );
vel[2] = 0;
dir[2] = 0;
+ VectorNormalize( vel );
+ VectorNormalize( dir );
+
charge *= DotProduct( dir, vel );
pm->ps->stats[ STAT_MISC ] += charge;