X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fcl_physics.qc;h=ff5fbaa37ee4cf436796d3bc709e8164993c5de6;hb=b2e411fc9fc541b28bcf4e3794336d148b752abc;hp=c136ef7b0a6e40f6ed96a5c69def085613599e0a;hpb=0e7ed909bffb4ff21f0c68d163edfc17487e380a;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/cl_physics.qc b/qcsrc/server/cl_physics.qc index c136ef7b0..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; @@ -87,7 +88,7 @@ void PlayerJump (void) self.velocity_z = max(cvar("sv_jumpvelocity") * cvar("sv_jumpspeedcap_min"), self.velocity_z); if(cvar_string("sv_jumpspeedcap_max") != "") { if(trace_fraction < 1 && trace_plane_normal_z < 0.98 && cvar("sv_jumpspeedcap_max_disable_on_ramps")) { - // don't do jump speedcaps on ramps to preserve old nexuiz ramjump style + // don't do jump speedcaps on ramps to preserve old xonotic ramjump style //print("Trace plane normal z: ", ftos(trace_plane_normal_z), ", disabling speed cap!\n"); } else @@ -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); } @@ -542,7 +543,6 @@ void PM_AirAccelerate(vector wishdir, float wishspeed) .vector v_angle_old; .string lastclassname; -void Nixnex_GiveCurrentWeapon(); .float() PlayerPhysplug; string specialcommand = "xwxwxsxsxaxdxaxdx1x "; @@ -689,6 +689,8 @@ void SV_PlayerPhysics() bot_think(); } + MUTATOR_CALLHOOK(PlayerPhysics); + self.items &~= IT_USING_JETPACK; if(self.classname == "player")