mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
restoreMenu: Go to Difficulty select after Match Race, instead of the level selection menu
- Splits M_SetupDifficultyOptions out of M_SetupDifficultySelect.
- Permits Encore to be handled on Difficulty menu if unlocked after a Match Race.
- Fixes an issue where the in-game Pause menu could be accessed in the menu
- The prevMenu that was set was overriden with in-game Pause.
- The assumption made - that the levelsearch/levellist struct would not be touched - is pretty transparently violated.
- I made it go back to the Difficulty select instead of fixing the issue because:
- Match Race is more dependent on the rules you configure for that particular round
- This mode of play will be modified in future to not be literally offline MP with things like voting, but instead return to the menu
- It was easier relative to the amount of work to properly restore (this is the biggest reason)
This commit is contained in:
parent
1aa9e01419
commit
a154b1a565
4 changed files with 21 additions and 8 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -500,7 +500,7 @@ void M_LevelSelected(INT16 add)
|
|||
}
|
||||
else
|
||||
{
|
||||
restoreMenu = &PLAY_LevelSelectDef;
|
||||
restoreMenu = &PLAY_RaceDifficultyDef;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue