]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/client.qc
Reset pressed keys when going observer
[xonotic/xonotic-data.pk3dir.git] / 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;