From: terencehill Date: Thu, 13 Feb 2020 19:33:46 +0000 (+0100) Subject: Reset pressed keys when switching spectated player X-Git-Tag: xonotic-v0.8.5~1145^2~10^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9c0b412eb53944a26d15a1e741a07f34088a89da;p=xonotic%2Fxonotic-data.pk3dir.git Reset pressed keys when switching spectated player --- diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index 5d536f894..b06f16310 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -1781,6 +1781,11 @@ void SetSpectatee_status(entity this, int spectatee_num) if (CS(this).spectatee_status != oldspectatee_status) { + if (STAT(PRESSED_KEYS, this)) + { + CS(this).pressedkeys = 0; + STAT(PRESSED_KEYS, this) = 0; + } ClientData_Touch(this); if (g_race || g_cts) race_InitSpectator(); }