From f2017fd31a7ef3b4b2f07ba739b6f6b410ea6d8a Mon Sep 17 00:00:00 2001 From: toaster Date: Wed, 17 Aug 2022 13:52:31 +0100 Subject: [PATCH] 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. --- src/m_menu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/m_menu.c b/src/m_menu.c index 7cf099d9..3243e0fc 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -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); }