Multiplayer: Load and display a server message of the day if present.

This commit is contained in:
Marco Cawthorne 2023-03-25 17:34:47 -07:00
parent b64bdc049a
commit 0704d3e7fd
Signed by: eukara
GPG key ID: CE2032F0A2882A22
3 changed files with 6 additions and 0 deletions

View file

@ -112,11 +112,14 @@ ClientGame_Init(float apilevel, string enginename, float engineversion)
Sound_Precache("nvg.off");
}
void VGUI_ShowMOTD(void);
void
ClientGame_InitDone(void)
{
if (serverkeyfloat("sv_playerslots") > 1)
Textmenu_Call("TEAM_SELECT");
VGUI_ShowMOTD();
}
void

View file

@ -42,5 +42,6 @@ radio.qc
../../../valve/src/client/modelevent.qc
../../../src/client/include.src
../../../valve/src/client/vgui_motd.qc
../../../src/shared/include.src
#endlist

View file

@ -208,6 +208,8 @@ CSMultiplayerRules::CreateTBuyzones(void)
void
CSMultiplayerRules::InitPostEnts(void)
{
MOTD_LoadDefault();
/* let's check if we need to create buyzones */
switch (g_cstrike_buying) {
case BUY_CT: