From: divverent Date: Sat, 30 Jan 2010 08:11:50 +0000 (+0000) Subject: fix a minor code bug that should never occur in the last commit ;) X-Git-Tag: xonotic-v0.1.0preview~230^2~581 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=fe43f96383669f5d325fb8f66252f7f6a61a5cca;p=xonotic%2Fdarkplaces.git 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 --- 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);