diff --git a/src/k_menu.h b/src/k_menu.h index b1b699fbc..ec6a96111 100644 --- a/src/k_menu.h +++ b/src/k_menu.h @@ -760,6 +760,7 @@ extern consvar_t cv_dummykartspeed; extern consvar_t cv_dummygpencore; extern consvar_t cv_dummymatchbots; +void M_SetupDifficultyOptions(INT32 choice); void M_SetupDifficultySelect(INT32 choice); void M_DifficultySelectInputs(INT32 choice); diff --git a/src/k_menufunc.c b/src/k_menufunc.c index eb0add401..338dfb35f 100644 --- a/src/k_menufunc.c +++ b/src/k_menufunc.c @@ -384,6 +384,7 @@ menu_t *M_SpecificMenuRestore(menu_t *torestore) if (levellist.newgametype == GT_RACE) { M_SetupRaceMenu(-1); + M_SetupDifficultyOptions((cupgrid.grandprix == false)); } if (!M_LevelListFromGametype(-1)) @@ -409,6 +410,13 @@ menu_t *M_SpecificMenuRestore(menu_t *torestore) } } } + else if (torestore == &PLAY_RaceDifficultyDef) + { + // Handle a much smaller subset of unlock restrictions + M_SetupGametypeMenu(-1); + M_SetupRaceMenu(-1); + M_SetupDifficultyOptions((cupgrid.grandprix == false)); + } else if (torestore == &EXTRAS_ReplayHutDef) { // Handle modifications to the folder while playing diff --git a/src/menus/play-local-race-difficulty.c b/src/menus/play-local-race-difficulty.c index 3199f6910..8ff884eda 100644 --- a/src/menus/play-local-race-difficulty.c +++ b/src/menus/play-local-race-difficulty.c @@ -71,14 +71,8 @@ static CV_PossibleValue_t dummymatchbots_cons_t[] = { }; consvar_t cv_dummymatchbots = CVAR_INIT ("dummymatchbots", "Off", CV_HIDDEN, dummymatchbots_cons_t, NULL); -void M_SetupDifficultySelect(INT32 choice) +void M_SetupDifficultyOptions(INT32 choice) { - // check what we picked. - choice = currentMenu->menuitems[itemOn].mvar1; - - // setup the difficulty menu and then remove choices depending on choice - PLAY_RaceDifficultyDef.prevMenu = currentMenu; - PLAY_RaceDifficulty[drace_gpdifficulty].status = IT_DISABLED; PLAY_RaceDifficulty[drace_mrkartspeed].status = IT_DISABLED; PLAY_RaceDifficulty[drace_mrcpu].status = IT_DISABLED; @@ -106,6 +100,16 @@ void M_SetupDifficultySelect(INT32 choice) { PLAY_RaceDifficulty[drace_encore].status = IT_STRING2|IT_CVAR; // Encore on/off } +} + +void M_SetupDifficultySelect(INT32 choice) +{ + (void)choice; + + // setup the difficulty menu and then remove choices depending on choice + PLAY_RaceDifficultyDef.prevMenu = currentMenu; + + M_SetupDifficultyOptions(currentMenu->menuitems[itemOn].mvar1); M_SetupNextMenu(&PLAY_RaceDifficultyDef, false); } diff --git a/src/menus/transient/level-select.c b/src/menus/transient/level-select.c index b4cf228cf..55cfa3e80 100644 --- a/src/menus/transient/level-select.c +++ b/src/menus/transient/level-select.c @@ -500,7 +500,7 @@ void M_LevelSelected(INT16 add) } else { - restoreMenu = &PLAY_LevelSelectDef; + restoreMenu = &PLAY_RaceDifficultyDef; } } else