mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-25 11:50:50 +00:00
Only display master server rules popup once per game boot.
Doesn't prevent it from happening later if the rules weren't successfully fetched, though.
This commit is contained in:
parent
5812d7343d
commit
f2017fd31a
1 changed files with 4 additions and 1 deletions
|
@ -6342,15 +6342,18 @@ void M_RefreshPauseMenu(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
boolean firstDismissedRulesThisBoot = true;
|
||||
|
||||
void M_PopupMasterServerRules(void)
|
||||
{
|
||||
#ifdef MASTERSERVER
|
||||
if (cv_advertise.value && (serverrunning || currentMenu == &MP_ServerDef))
|
||||
if (cv_advertise.value && (serverrunning || currentMenu == &MP_ServerDef) && firstDismissedRulesThisBoot)
|
||||
{
|
||||
char *rules = GetMasterServerRules();
|
||||
|
||||
if (rules)
|
||||
{
|
||||
firstDismissedRulesThisBoot = false;
|
||||
M_StartMessage(va("%s\n(press any key)", rules), NULL, MM_NOTHING);
|
||||
Z_Free(rules);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue