From b4d0088e21e314fd692479f40185d6983e28fbae Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 10 Apr 2015 05:16:14 +1000 Subject: [PATCH] As a temporary solution, force cl_sidespeed and cl_forwardspeed to match the maxspeed stat (these are overridden whenever sv_maxspeed changes anyway) --- qcsrc/common/physics.qc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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 -- 2.39.2