From 369dd6ba78e2ac780c484599848990804857177b Mon Sep 17 00:00:00 2001 From: z411 Date: Fri, 25 Nov 2022 00:20:06 -0300 Subject: [PATCH] Add menu_gamemenu client cvar for the in-game menu --- qcsrc/client/main.qc | 2 +- qcsrc/client/main.qh | 1 + xonotic-client.cfg | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/qcsrc/client/main.qc b/qcsrc/client/main.qc index 69214ee8a..74ff56bb1 100644 --- a/qcsrc/client/main.qc +++ b/qcsrc/client/main.qc @@ -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; diff --git a/qcsrc/client/main.qh b/qcsrc/client/main.qh index 1f1c29002..b050fcd64 100644 --- a/qcsrc/client/main.qh +++ b/qcsrc/client/main.qh @@ -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; diff --git a/xonotic-client.cfg b/xonotic-client.cfg index d427b0f5a..4cd709bb6 100644 --- a/xonotic-client.cfg +++ b/xonotic-client.cfg @@ -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 -- 2.39.2