]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Quickmenu: let the engine handle all release key events so that it's possible to...
authorterencehill <piuntn@gmail.com>
Wed, 8 Sep 2021 15:04:26 +0000 (17:04 +0200)
committerterencehill <piuntn@gmail.com>
Wed, 8 Sep 2021 15:07:23 +0000 (17:07 +0200)
qcsrc/client/hud/panel/quickmenu.qc

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