diff options
author | Roman Tetelman <kevlarman@gmail.com> | 2009-10-03 11:49:19 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:15:22 +0000 |
commit | 0b913bba474a108931c1308922fa3d3e8f0d75d4 (patch) | |
tree | 59ba840d56b71fd1a9f43093719f544517c1df47 /src | |
parent | d2a28e8dcf0acdbb4d2bcd030ba9953e4038ab29 (diff) |
fix for trample's rate of charge depending on pitch
Diffstat (limited to 'src')
-rw-r--r-- | src/game/bg_pmove.c | 4 |
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; |