From: terencehill Date: Wed, 8 Sep 2021 15:04:26 +0000 (+0200) Subject: Quickmenu: let the engine handle all release key events so that it's possible to... X-Git-Tag: xonotic-v0.8.5~343^2~2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=45c0440bd50af3f7e95dc45a2f36a0bc0e9b8597;p=xonotic%2Fxonotic-data.pk3dir.git Quickmenu: let the engine handle all release key events so that it's possible to stop movement, weapon fire, etc... It fixes #2487 --- diff --git a/qcsrc/client/hud/panel/quickmenu.qc b/qcsrc/client/hud/panel/quickmenu.qc index e3cfa12dd..5a2df710f 100644 --- a/qcsrc/client/hud/panel/quickmenu.qc +++ b/qcsrc/client/hud/panel/quickmenu.qc @@ -467,15 +467,13 @@ bool QuickMenu_InputEvent(int bInputType, float nPrimary, float nSecondary) if(nPrimary == K_ESCAPE) { - if (!key_pressed) - return true; - QuickMenu_Close(); + if (key_pressed) + QuickMenu_Close(); } else if(nPrimary >= '0' && nPrimary <= '9') { - if (!key_pressed) - return true; - QuickMenu_Page_ActiveEntry(stof(chr2str(nPrimary))); + if (key_pressed) + QuickMenu_Page_ActiveEntry(stof(chr2str(nPrimary))); } if(nPrimary == K_MOUSE1) { @@ -494,6 +492,10 @@ bool QuickMenu_InputEvent(int bInputType, float nPrimary, float nSecondary) else if(hit_con_bind) return false; + // let the engine handle all release key events so that it's possible to stop movement, weapon fire, etc... + if(!key_pressed) + return false; + return true; }