]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
As a temporary solution, force cl_sidespeed and cl_forwardspeed to match the maxspeed...
authorMario <zacjardine@y7mail.com>
Thu, 9 Apr 2015 19:16:14 +0000 (05:16 +1000)
committerMario <zacjardine@y7mail.com>
Thu, 9 Apr 2015 19:16:14 +0000 (05:16 +1000)
qcsrc/common/physics.qc

index 55d373bc6fd678d3cccc5b16507ca4dab3a64178..18126aaa92fef4b4d81d2f50ba01e5d02bf22161 100644 (file)
@@ -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