]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/ecs/systems/sv_physics.qc
Remove some old now useless macros clogging up the trigger system
[xonotic/xonotic-data.pk3dir.git] / qcsrc / ecs / systems / sv_physics.qc
index aaef9f38330d0ba7609b250b4d31498262ea7ab6..9e46dcfc57513b42bb6d6e634666a7c30fe6ed80 100644 (file)
@@ -3,14 +3,19 @@
 void sys_phys_fix(entity this, float dt)
 {
        WarpZone_PlayerPhysics_FixVAngle(this);
+       STAT(MOVEVARS_HIGHSPEED, this) = autocvar_g_movement_highspeed;
+       MUTATOR_CALLHOOK(PlayerPhysics_UpdateStats, this); // do it BEFORE the function so we can modify highspeed!
        Physics_UpdateStats(this, PHYS_HIGHSPEED(this));
 }
 
 bool sys_phys_override(entity this, float dt)
 {
        int buttons = PHYS_INPUT_BUTTON_MASK(this);
+       float idlesince = this.parm_idlesince;
+       this.parm_idlesince = time; // in the case that physics are overridden
        if (PM_check_specialcommand(this, buttons)) { return true; }
        if (this.PlayerPhysplug && this.PlayerPhysplug(this, dt)) { return true; }
+       this.parm_idlesince = idlesince;
        return false;
 }