]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Reset QuickMenu_Page_Command_Type when clearing up a quickmenu command otherwise...
authorterencehill <piuntn@gmail.com>
Wed, 6 Jul 2016 17:45:54 +0000 (19:45 +0200)
committerterencehill <piuntn@gmail.com>
Wed, 6 Jul 2016 17:45:54 +0000 (19:45 +0200)
qcsrc/client/hud/panel/quickmenu.qc

index 08d97ffd2e5a64027eb730017bce4f2ad9b2d17a..d7d2b163d34a5a2f180a8a6a404e6611ec54e824 100644 (file)
@@ -58,6 +58,7 @@ void QuickMenu_Page_ClearEntry(int i)
        if (QuickMenu_Page_Command[i])
                strunzone(QuickMenu_Page_Command[i]);
        QuickMenu_Page_Command[i] = string_null;
+       QuickMenu_Page_Command_Type[i] = 0;
 }
 
 float QuickMenu_Page_Load(string target_submenu, float new_page);
@@ -660,7 +661,7 @@ void HUD_QuickMenu()
                                else
                                        tokenize_console(substring(QuickMenu_Page_Command[i], 0, end));
 
-                               //if(argv(1) && argv(0) == "toggle") // already checked
+                               if(argv(1) && argv(0) == "toggle")
                                {
                                        // "enable feature xxx" "toggle xxx" (or "toggle xxx 1 0")
                                        // "disable feature xxx" "toggle xxx 0 1"