From: bones_was_here Date: Sun, 9 Feb 2025 14:07:34 +0000 (+1000) Subject: Don't update idletime while the game window is inactive X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f490ca333ad3e29a6568a1efef11e05591b25249;p=xonotic%2Fxonotic-data.pk3dir.git Don't update idletime while the game window is inactive --- 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); }