From 54b05102aabaea01187c59189ae1653830619fcd Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Tue, 20 Jul 2010 19:45:19 +0200 Subject: [PATCH] improve implementation of airstopaccelerate fix --- qcsrc/server/cl_physics.qc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/qcsrc/server/cl_physics.qc b/qcsrc/server/cl_physics.qc index 05f8676f2..b217a661c 100644 --- a/qcsrc/server/cl_physics.qc +++ b/qcsrc/server/cl_physics.qc @@ -1205,7 +1205,12 @@ void SV_PlayerPhysics() // CPM if(sv_airstopaccelerate) - airaccel = airaccel + (sv_airstopaccelerate*maxspd_mod - airaccel) * max(0, -(normalize(self.velocity) * wishdir)); + { + curdir = self.velocity; + curdir_z = 0; + curdir = normalize(curdir); + airaccel = airaccel + (sv_airstopaccelerate*maxspd_mod - airaccel) * max(0, -(curdir * wishdir)); + } // note that for straight forward jumping: // step = accel * frametime * wishspeed0; // accel = bound(0, wishspeed - vel_xy_current, step) * accelqw + step * (1 - accelqw); -- 2.39.2