From: Mario Date: Wed, 1 Mar 2017 12:41:29 +0000 (+1000) Subject: If physics are overridden, reset the idle time (fixes getting kicked while driving... X-Git-Tag: xonotic-v0.8.2~161 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1dddbdac5618956edc039a98ece35d8b8661b9af;p=xonotic%2Fxonotic-data.pk3dir.git If physics are overridden, reset the idle time (fixes getting kicked while driving a vehicle) --- diff --git a/qcsrc/ecs/systems/sv_physics.qc b/qcsrc/ecs/systems/sv_physics.qc index aaef9f383..a68d51b8e 100644 --- a/qcsrc/ecs/systems/sv_physics.qc +++ b/qcsrc/ecs/systems/sv_physics.qc @@ -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; }