diff --git a/src/g_game.c b/src/g_game.c index 798db2536..db23f0c1c 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -3982,7 +3982,9 @@ static void G_GetNextMap(void) if (K_CanChangeRules(true)) { - switch (cv_advancemap.value) + if (!netgame) // Match Race. + nextmap = NEXTMAP_TITLE; + else switch (cv_advancemap.value) { case 0: // Stay on same map. nextmap = prevmap; 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..30e6436fc 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; @@ -94,6 +88,11 @@ void M_SetupDifficultySelect(INT32 choice) PLAY_RaceDifficulty[drace_mrracers].status = IT_STRING2|IT_CVAR; // CPU amount PLAY_RaceDifficulty[drace_mapselect].status = IT_STRING|IT_CALL; // Level Select (Match Race) PLAY_RaceDifficultyDef.lastOn = drace_mapselect; // Select map select by default. + + if (M_SecretUnlocked(SECRET_ENCORE, false)) + { + PLAY_RaceDifficulty[drace_encore].status = IT_STRING2|IT_CVAR; // Encore on/off + } } else // GP { @@ -101,11 +100,16 @@ void M_SetupDifficultySelect(INT32 choice) PLAY_RaceDifficulty[drace_cupselect].status = IT_STRING|IT_CALL; // Level Select (GP) PLAY_RaceDifficultyDef.lastOn = drace_cupselect; // Select cup select by default. } +} - if (M_SecretUnlocked(SECRET_ENCORE, false)) - { - 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 diff --git a/src/y_inter.c b/src/y_inter.c index 902966ca4..e40a55fcd 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -569,19 +569,28 @@ skiptallydrawer: if (!LUA_HudEnabled(hud_intermissionmessages)) return; - if (timer && grandprixinfo.gp == false && !modeattacking) + if (timer) { - char *string; - INT32 tickdown = (timer+1)/TICRATE; + if (netgame || demo.netgame) + { + char *string; + INT32 tickdown = (timer+1)/TICRATE; - if (multiplayer && demo.playback) - string = va("Replay ends in %d", tickdown); - else - string = va("%s starts in %d", cv_advancemap.string, tickdown); + if (demo.playback) + string = va("Replay ends in %d", tickdown); + else + string = va("%s starts in %d", cv_advancemap.string, tickdown); - V_DrawCenteredString(BASEVIDWIDTH/2, 188, hilicol, string); + V_DrawCenteredString(BASEVIDWIDTH/2, 188, hilicol, string); - if ((demo.recording || demo.savemode == DSM_SAVED) && !demo.playback) + if (speedscramble != -1 && speedscramble != gamespeed) + { + V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT-24, hilicol|V_ALLOWLOWERCASE|V_SNAPTOBOTTOM, + va(M_GetText("Next race will be %s Speed!"), kartspeed_cons_t[1+speedscramble].strvalue)); + } + } + + if ((modeattacking == ATTACKING_NONE) && (demo.recording || demo.savemode == DSM_SAVED) && !demo.playback) { switch (demo.savemode) { @@ -601,15 +610,6 @@ skiptallydrawer: break; } } - - //if ((intertic/TICRATE) & 1) // Make it obvious that scrambling is happening next round. (OR NOT, I GUESS) - //{ - if (speedscramble != -1 && speedscramble != gamespeed) - { - V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT-24, hilicol|V_ALLOWLOWERCASE|V_SNAPTOBOTTOM, - va(M_GetText("Next race will be %s Speed!"), kartspeed_cons_t[1+speedscramble].strvalue)); - } - //} } M_DrawMenuForeground();