]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/main.qc
Remove legacy MOTD logic
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / main.qc
index 091cc466183efecd96bda5291383c2aab720acda..ea7e1dda83b0f5cae2a5341a5ba50315cc71187b 100644 (file)
@@ -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");
@@ -1442,7 +1449,7 @@ void Welcome_Message_Show_Try()
                                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;