]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add cvar cl_welcome to control if Welcome dialog appears automatically 1012/head
authorbones_was_here <bones_was_here@xa.org.au>
Sun, 3 Jul 2022 23:18:48 +0000 (09:18 +1000)
committerbones_was_here <bones_was_here@xa.org.au>
Thu, 7 Jul 2022 14:21:29 +0000 (00:21 +1000)
Replaces cvar cl_welcome_in_menu_dialog

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

index cfadaf1b21a691bfe70394cc7c0fb3f7a88e422b..a9e9a3d0562fb970ae4c25117689a68ab383c769 100644 (file)
@@ -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");
                }
 
index bc16a86434e48ed271b5cca7924a10ddf63af4e7..a71d72d536dfb7eb930ab763a8f4798327e33a2d 100644 (file)
@@ -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;
index 2e40bc277c5151906f2c84dfbcf6a4fa0a64eeff..e751bcc2c168966469557ef2106c0e4b5edd7374 100644 (file)
@@ -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