From 1dddbdac5618956edc039a98ece35d8b8661b9af Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 1 Mar 2017 22:41:29 +1000 Subject: [PATCH] If physics are overridden, reset the idle time (fixes getting kicked while driving a vehicle) --- qcsrc/ecs/systems/sv_physics.qc | 3 +++ 1 file changed, 3 insertions(+) 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; } -- 2.39.2