From 45c0440bd50af3f7e95dc45a2f36a0bc0e9b8597 Mon Sep 17 00:00:00 2001 From: terencehill Date: Wed, 8 Sep 2021 17:04:26 +0200 Subject: [PATCH] Quickmenu: let the engine handle all release key events so that it's possible to stop movement, weapon fire, etc... It fixes #2487 --- qcsrc/client/hud/panel/quickmenu.qc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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; } -- 2.39.2