M_InitExtras: Call with parameter -1 in more circumstances, to prevent an incorrect Extras Menu after Addon load/Challenge unlock.

This commit is contained in:
toaster 2023-06-06 15:55:23 +01:00
parent 4ceeea0bbd
commit 7fd957c929
2 changed files with 8 additions and 0 deletions

View file

@ -487,6 +487,11 @@ menu_t *M_SpecificMenuRestore(menu_t *torestore)
// Ticker init
M_MPOptSelectInit(-1);
}
else if (torestore == &EXTRAS_MainDef)
{
// Disable or enable certain options
M_InitExtras(-1);
}
// One last catch.
M_SetupPlayMenu(-1);

View file

@ -341,6 +341,9 @@ void M_HandleAddons(INT32 choice)
// Secret menu!
//MainMenu[secrets].status = (M_AnySecretUnlocked()) ? (IT_STRING | IT_CALL) : (IT_DISABLED);
// I could guard it, but let's just always do this.
M_InitExtras(-1);
if (currentMenu->prevMenu)
M_SetupNextMenu(M_InterruptMenuWithChallenges(currentMenu->prevMenu), false);
else