From f490ca333ad3e29a6568a1efef11e05591b25249 Mon Sep 17 00:00:00 2001 From: bones_was_here Date: Mon, 10 Feb 2025 00:07:34 +1000 Subject: [PATCH] Don't update idletime while the game window is inactive --- qcsrc/ecs/systems/sv_physics.qc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/qcsrc/ecs/systems/sv_physics.qc b/qcsrc/ecs/systems/sv_physics.qc index 2d00a4d21..8b39cfee1 100644 --- a/qcsrc/ecs/systems/sv_physics.qc +++ b/qcsrc/ecs/systems/sv_physics.qc @@ -26,10 +26,13 @@ void sys_phys_monitor(entity this, float dt) { int buttons = PHYS_INPUT_BUTTON_MASK(this); anticheat_physics(this); - if (autocvar_sv_maxidle > 0 || autocvar_sv_maxidle_playertospectator > 0) { + if (autocvar_sv_maxidle > 0 || autocvar_sv_maxidle_playertospectator > 0) + { + if (!PHYS_INPUT_BUTTON_CHAT(this)) if (buttons != CS(this).buttons_old - || CS(this).movement != CS(this).movement_old - || this.v_angle != CS(this).v_angle_old) { CS(this).parm_idlesince = time; } + || CS(this).movement != CS(this).movement_old + || this.v_angle != CS(this).v_angle_old) + CS(this).parm_idlesince = time; } PM_check_punch(this, dt); } -- 2.39.5