From: Rudolf Polzer Date: Tue, 20 Jul 2010 17:45:19 +0000 (+0200) Subject: improve implementation of airstopaccelerate fix X-Git-Tag: xonotic-v0.1.0preview~443 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=54b05102aabaea01187c59189ae1653830619fcd;p=xonotic%2Fxonotic-data.pk3dir.git improve implementation of airstopaccelerate fix --- 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);