]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/ecs/systems/cl_physics.qc
Calculate desired speed on the client side, alleviates the need for a networked stat
[xonotic/xonotic-data.pk3dir.git] / qcsrc / ecs / systems / cl_physics.qc
index 4d38c574d9cdac5345bdf9782989aed40b694f7d..d4718514d232770721dc8d215b87e35dd51b8f0a 100644 (file)
@@ -26,7 +26,7 @@ void sys_phys_spectator_control(entity this) {}
 
 void sys_phys_fixspeed(entity this, float maxspeed_mod)
 {
-       float spd = STAT(MOVEVARS_SPEED, this);
+       float spd = max(PHYS_MAXSPEED(this), PHYS_MAXAIRSPEED(this)) * maxspeed_mod;
        if (this.speed != spd) {
                this.speed = spd;
                string temps = ftos(spd);