From: Mario Date: Thu, 9 Apr 2015 19:16:14 +0000 (+1000) Subject: As a temporary solution, force cl_sidespeed and cl_forwardspeed to match the maxspeed... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b4d0088e21e314fd692479f40185d6983e28fbae;p=xonotic%2Fxonotic-data.pk3dir.git As a temporary solution, force cl_sidespeed and cl_forwardspeed to match the maxspeed stat (these are overridden whenever sv_maxspeed changes anyway) --- diff --git a/qcsrc/common/physics.qc b/qcsrc/common/physics.qc index 55d373bc6..18126aaa9 100644 --- a/qcsrc/common/physics.qc +++ b/qcsrc/common/physics.qc @@ -1450,7 +1450,7 @@ void PM_walk(float buttons_prev, float maxspd_mod) } // walking - makevectors(PHYS_INPUT_ANGLES(self).y * '0 1 0'); + makevectors(self.v_angle.y * '0 1 0'); vector wishvel = v_forward * self.movement.x + v_right * self.movement.y; // acceleration @@ -1603,6 +1603,11 @@ bool IsFlying(entity a) return true; } +#ifdef CSQC +float autocvar_cl_forwardspeed; +float autocvar_cl_sidespeed; +#endif + void PM_Main() { float buttons = PHYS_INPUT_BUTTON_MASK(self); @@ -1614,6 +1619,12 @@ void PM_Main() self.v_angle = PHYS_INPUT_ANGLES(self); self.angles = PHYS_WORLD_ANGLES(self); + if(PHYS_MAXSPEED(self) != autocvar_cl_forwardspeed || PHYS_MAXSPEED(self) != autocvar_cl_sidespeed) + { + cvar_set("cl_forwardspeed", ftos(PHYS_MAXSPEED(self))); + cvar_set("cl_sidespeed", ftos(PHYS_MAXSPEED(self))); + } + self.team = myteam + 1; // is this correct? if (!(PHYS_INPUT_BUTTON_JUMP(self))) // !jump UNSET_JUMP_HELD(self); // canjump = true