]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
If physics are overridden, reset the idle time (fixes getting kicked while driving...
authorMario <mario@smbclan.net>
Wed, 1 Mar 2017 12:41:29 +0000 (22:41 +1000)
committerMario <mario@smbclan.net>
Wed, 1 Mar 2017 12:41:29 +0000 (22:41 +1000)
qcsrc/ecs/systems/sv_physics.qc

index aaef9f38330d0ba7609b250b4d31498262ea7ab6..a68d51b8e677f770b8dce708ed7fc5e4eb6fe1bb 100644 (file)
@@ -9,8 +9,11 @@ void sys_phys_fix(entity this, float dt)
 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;
 }