X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fcl_physics.qc;h=ff5fbaa37ee4cf436796d3bc709e8164993c5de6;hb=b2e411fc9fc541b28bcf4e3794336d148b752abc;hp=66dc32fcce2593eb3f570309679bcddc25303d9d;hpb=14ee7a437513ad91c6f74b457bfc8da6ce1dbc08;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/cl_physics.qc b/qcsrc/server/cl_physics.qc index 66dc32fcc..ff5fbaa37 100644 --- a/qcsrc/server/cl_physics.qc +++ b/qcsrc/server/cl_physics.qc @@ -14,6 +14,7 @@ float sv_airstopaccelerate; float sv_airstrafeaccelerate; float sv_maxairstrafespeed; float sv_aircontrol; +float sv_aircontrol_power; float sv_warsowbunny_airforwardaccel; float sv_warsowbunny_accel; float sv_warsowbunny_topspeed; @@ -416,10 +417,10 @@ void CPM_PM_Aircontrol(vector wishdir, float wishspeed) xyspeed = vlen(self.velocity); self.velocity = normalize(self.velocity); dot = self.velocity * wishdir; - k *= sv_aircontrol*dot*dot*frametime; if(dot > 0) // we can't change direction while slowing down { + k *= fabs(sv_aircontrol)*pow(dot, sv_aircontrol_power)*frametime; self.velocity = normalize(self.velocity * xyspeed + wishdir * k); } @@ -593,8 +594,6 @@ void SV_PlayerPhysics() float not_allowed_to_move; string c; - MUTATOR_CALLHOOK(PlayerPhysics); - if(self.PlayerPhysplug) if(self.PlayerPhysplug()) return; @@ -690,6 +689,8 @@ void SV_PlayerPhysics() bot_think(); } + MUTATOR_CALLHOOK(PlayerPhysics); + self.items &~= IT_USING_JETPACK; if(self.classname == "player")