]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'z411/gamemenu_cvar' into 'master'
authorterencehill <piuntn@gmail.com>
Sun, 25 Dec 2022 22:32:31 +0000 (22:32 +0000)
committerterencehill <piuntn@gmail.com>
Sun, 25 Dec 2022 22:32:31 +0000 (22:32 +0000)
Add menu_gamemenu client cvar to enable/disable the in-game menu

Closes #2732

See merge request xonotic/xonotic-data.pk3dir!1101

qcsrc/client/main.qc
qcsrc/client/main.qh
xonotic-client.cfg

index 9c610aabca53484a66ec502772e79dc483336010..4e05e681db3d48d8c37276dfe4339e4e895fcd9e 100644 (file)
@@ -526,7 +526,7 @@ float CSQC_InputEvent(int bInputType, float nPrimary, float nSecondary)
                        Scoreboard_UI_Enable(0);
                        return true;
                }
-               if (!isdemo() && cvar("_menu_gamemenu_dialog_available"))
+               if (autocvar_menu_gamemenu && !isdemo() && cvar("_menu_gamemenu_dialog_available"))
                {
                        localcmd("\nmenu_showgamemenudialog\n");
                        return true;
index 00dd149638de748bb50cf927b89ec9e20a2c5f92..1f9e6a9a03e5aa1f78ef13dd78a8de13b79853ca 100644 (file)
@@ -20,6 +20,7 @@ bool autocvar_developer_csqcentities;
 bool autocvar_cl_race_cptimes_onlyself; // TODO: move to race gamemode
 bool autocvar_cl_race_cptimes_showself = false;
 bool autocvar_cl_welcome = true;
+bool autocvar_menu_gamemenu = true;
 
 // Map coordinate base calculations need these
 vector mi_center;
index d427b0f5a7fe73edb0ebd0510fb003778243a469..4cd709bb6d9689c864affa5f354ad86d99a68c04 100644 (file)
@@ -870,6 +870,9 @@ scr_loadingscreen_scale 999
 scr_loadingscreen_scale_base 1
 scr_loadingscreen_scale_limit 2
 
+// in-game menu
+seta menu_gamemenu 1 "1: show in-game menu when esc is pressed; 0: show main menu when esc is pressed"
+
 // other config files
 exec effects-normal.cfg
 exec crosshairs.cfg