fix a minor code bug that should never occur in the last commit ;)
authordiv0 <div0@f962a42d-fe04-0410-a3ab-8c8b0445ebaa>
Sat, 30 Jan 2010 08:12:45 +0000 (08:12 +0000)
committerdiv0 <div0@f962a42d-fe04-0410-a3ab-8c8b0445ebaa>
Sat, 30 Jan 2010 08:12:45 +0000 (08:12 +0000)
git-svn-id: svn://svn.icculus.org/nexuiz/trunk@8592 f962a42d-fe04-0410-a3ab-8c8b0445ebaa

data/qcsrc/server/cl_physics.qc

index 121c947..d0a58c5 100644 (file)
@@ -441,6 +441,8 @@ void PM_Accelerate(vector wishdir, float wishspeed, float wishspeed0, float acce
        vel_xy_current  = vlen(vel_xy);
        vel_xy_forward  = vel_xy_current + bound(0, wishspeed - vel_xy_current, step) * accelqw + step * (1 - accelqw);
        vel_xy_backward = vel_xy_current - bound(0, wishspeed + vel_xy_current, step) * accelqw - step * (1 - accelqw);
+       if(vel_xy_backward < 0)
+               vel_xy_backward = 0; // not that it REALLY occurs that this would cause wrong behaviour afterwards
 
        vel_straight = vel_straight + bound(0, wishspeed - vel_straight, step) * accelqw + step * (1 - accelqw);