]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/main.qc
Allow showing the Welcome dialog in demos, initially hidden
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / main.qc
index 0a643da4aaabd37eef38d5bf7fc32fbeeb805cf3..cfadaf1b21a691bfe70394cc7c0fb3f7a88e422b 100644 (file)
@@ -1434,17 +1434,16 @@ void Welcome_Message_Show_Try()
        if (!welcome_msg_menu_check_maxtime)
                return;
 
-       bool want_dialog = !isdemo();
        // if want dialog check if menu is initialized but for a short time
-       if (!want_dialog || cvar("_menu_initialized") == 2 || time > welcome_msg_menu_check_maxtime)
+       if (cvar("_menu_initialized") == 2 || time > welcome_msg_menu_check_maxtime)
        {
-               if (want_dialog && cvar("_menu_welcome_dialog_available"))
+               if (cvar("_menu_welcome_dialog_available"))
                {
                        string welcomedialog_args = strcat("HOSTNAME \"", hostname, "\"");
                        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) // close it after it's been initialized so it can still be opened manually
+                       if (intermission || isdemo()) // close it after it's been initialized so it can still be opened manually
                                localcmd("\ntogglemenu 0\n");
                }