]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Reset pressed keys when switching spectated player
authorterencehill <piuntn@gmail.com>
Thu, 13 Feb 2020 19:33:46 +0000 (20:33 +0100)
committerterencehill <piuntn@gmail.com>
Thu, 13 Feb 2020 19:33:46 +0000 (20:33 +0100)
qcsrc/server/client.qc

index 5d536f8947c44e4f495eca76b5fcfd22c9b1db93..b06f16310cea3f1e036631b7bd39016577d56d26 100644 (file)
@@ -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();
        }