From fe43f96383669f5d325fb8f66252f7f6a61a5cca Mon Sep 17 00:00:00 2001 From: divverent Date: Sat, 30 Jan 2010 08:11:50 +0000 Subject: [PATCH] fix a minor code bug that should never occur in the last commit ;) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9888 d7cf8633-e32d-0410-b094-e92efae38249 --- cl_input.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cl_input.c b/cl_input.c index 28339a43..e0b7e261 100644 --- a/cl_input.c +++ b/cl_input.c @@ -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); -- 2.39.2