{
string hostname = ReadString();
string msg = ReadString();
- // players running older Xonotic version without the Welocome dialog have the cvar
- // cl_welcome_in_menu_dialog not saved because it was created by the relative autocvar
- // initilaization when server's client program is run
- if (cvar_type("cl_welcome_in_menu_dialog") & CVAR_TYPEFLAG_SAVED && autocvar_cl_welcome_in_menu_dialog)
+ if (cvar("_menu_welcome_dialog_available") && autocvar_cl_welcome_in_menu_dialog)
{
string welcomedialog_args;
welcomedialog_args = strcat("name \"", hostname, "\"");
{
welcomeDialog_resetStrings(me);
SUPER(XonoticWelcomeDialog).configureDialog(me);
+ registercvar("_menu_welcome_dialog_available", "0", 0);
+ cvar_set("_menu_welcome_dialog_available", "1");
+}
+
+void XonoticWelcomeDialog_destroy(entity me)
+{
+ cvar_set("_menu_welcome_dialog_available", "0");
}
void XonoticWelcomeDialog_readInputArgs(entity me, float argsbuf)
METHOD(XonoticWelcomeDialog, keyDown, float(entity, float, float, float));
METHOD(XonoticWelcomeDialog, configureDialog, void(entity));
+ METHOD(XonoticWelcomeDialog, destroy, void(entity));
METHOD(XonoticWelcomeDialog, readInputArgs, void(entity, float));
ATTRIB(XonoticWelcomeDialog, serverinfo_name, string, string_null);
//ATTRIB(XonoticWelcomeDialog, serverinfo_name_ent, entity, world);