From d52a991344e75e0b832dfa5ae638246a2d40fadf Mon Sep 17 00:00:00 2001 From: bones_was_here Date: Mon, 4 Jul 2022 09:18:48 +1000 Subject: [PATCH] Add cvar cl_welcome to control if Welcome dialog appears automatically Replaces cvar cl_welcome_in_menu_dialog --- qcsrc/client/main.qc | 3 ++- qcsrc/client/main.qh | 1 + xonotic-client.cfg | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/qcsrc/client/main.qc b/qcsrc/client/main.qc index cfadaf1b2..a9e9a3d05 100644 --- a/qcsrc/client/main.qc +++ b/qcsrc/client/main.qc @@ -1443,7 +1443,8 @@ void Welcome_Message_Show_Try() string msg = MakeConsoleSafe(strreplace("\n", "\\n", welcome_msg)); welcomedialog_args = strcat(welcomedialog_args, " WELCOME \"", msg, "\""); localcmd("\nmenu_cmd directmenu Welcome ", welcomedialog_args, "\n"); - if (intermission || isdemo()) // close it after it's been initialized so it can still be opened manually + if (intermission || isdemo() || !autocvar_cl_welcome) + // close it after it's been initialized so it can still be opened manually localcmd("\ntogglemenu 0\n"); } diff --git a/qcsrc/client/main.qh b/qcsrc/client/main.qh index bc16a8643..a71d72d53 100644 --- a/qcsrc/client/main.qh +++ b/qcsrc/client/main.qh @@ -19,6 +19,7 @@ bool autocvar__hud_showbinds_reload; 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; // Map coordinate base calculations need these vector mi_center; diff --git a/xonotic-client.cfg b/xonotic-client.cfg index 2e40bc277..e751bcc2c 100644 --- a/xonotic-client.cfg +++ b/xonotic-client.cfg @@ -31,6 +31,7 @@ alias +show_info1 "menu_showwelcomedialog" alias -show_info1 "" alias +show_info +show_info$_menu_welcome_dialog_available alias -show_info -show_info$_menu_welcome_dialog_available +seta cl_welcome 1 "1: show the Welcome dialog when connecting; 0: show it only when +show_info keybind is pressed" // merge lightmaps up to 2048x2048 textures mod_q3bsp_lightmapmergepower 4 -- 2.39.2