]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix a minor code bug that should never occur in the last commit ;)
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 30 Jan 2010 08:11:50 +0000 (08:11 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 30 Jan 2010 08:11:50 +0000 (08:11 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9888 d7cf8633-e32d-0410-b094-e92efae38249

cl_input.c

index 28339a431a3eaed4268e52093d8838196112e35e..e0b7e2619a9569aa072d00f88968d194a4a131ba 100644 (file)
@@ -1130,6 +1130,8 @@ void CL_ClientMovement_Physics_PM_Accelerate(cl_clientmovement_state_t *s, vec3_
        vel_xy_current  = VectorLength(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);