X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fclient%2Fmain.qc;h=ea7e1dda83b0f5cae2a5341a5ba50315cc71187b;hp=e5b38b76834bb1cb1d40335e058f2c9f71e2a6b8;hb=18bd49fa931fff143ba3cfff468774aea65bd882;hpb=222b94d2d796e4282af54ed199b6605c73b690f3 diff --git a/qcsrc/client/main.qc b/qcsrc/client/main.qc index e5b38b7683..ea7e1dda83 100644 --- a/qcsrc/client/main.qc +++ b/qcsrc/client/main.qc @@ -178,7 +178,14 @@ void Shutdown() if (!(calledhooks & HOOK_START)) localcmd("\n_cl_hook_gamestart nop\n"); if (!(calledhooks & HOOK_END)) + { + int gamecount = cvar("cl_matchcount"); localcmd("\ncl_hook_gameend\n"); + // NOTE: using localcmd here to ensure it's executed AFTER cl_hook_gameend + // earlier versions of the game abuse the hook to set this cvar + localcmd(strcat("cl_matchcount ", itos(gamecount + 1), "\n")); + //cvar_set("cl_matchcount", itos(gamecount + 1)); + } } localcmd("\ncl_hook_shutdown\n"); @@ -437,6 +444,9 @@ void PostInit() TrueAim_Init(); + // this can't be called in CSQC_Init as it'd send cvars too early + ReplicateVars_Start(); + postinit = true; } @@ -665,9 +675,6 @@ NET_HANDLE(ENT_CLIENT_CLIENTDATA, bool isnew) spectatee_status = newspectatee_status; // we could get rid of spectatee_status, and derive it from player_localentnum and player_localnum - - // this can't be called in CSQC_Init as it'd send cvars too early - ReplicateVars_Start(); } NET_HANDLE(ENT_CLIENT_NAGGER, bool isnew) @@ -1438,9 +1445,11 @@ 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) // close it after it's been initialized so it can still be opened manually + localcmd("\ntogglemenu 0\n"); } else - centerprint_Add(ORDINAL(CPID_MOTD), strcat(hostname, "\n\n\n", welcome_msg), -1, 0); + centerprint_Add(ORDINAL(CPID_MOTD), strcat(hostname, "\n\n\n", welcome_msg), 15, 0); strfree(welcome_msg); welcome_msg_menu_check_maxtime = 0;