]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Reset pressed keys when going observer
authorterencehill <piuntn@gmail.com>
Thu, 13 Feb 2020 15:43:20 +0000 (16:43 +0100)
committerterencehill <piuntn@gmail.com>
Thu, 13 Feb 2020 15:43:20 +0000 (16:43 +0100)
qcsrc/server/client.qc

index 887e00c5946263b8ddc511ec1a2ca1673cf9f733..5d536f8947c44e4f495eca76b5fcfd22c9b1db93 100644 (file)
@@ -2720,6 +2720,11 @@ void PlayerPostThink (entity this)
                }
                GetPressedKeys(this);
        }
+       else if (IS_OBSERVER(this) && STAT(PRESSED_KEYS, this))
+       {
+               CS(this).pressedkeys = 0;
+               STAT(PRESSED_KEYS, this) = 0;
+       }
 
        if (this.waypointsprite_attachedforcarrier) {
                float hp = healtharmor_maxdamage(GetResource(this, RES_HEALTH), GetResource(this, RES_ARMOR), autocvar_g_balance_armor_blockpercent, DEATH_WEAPON.m_id).x;