diff --git a/src/g_game.c b/src/g_game.c index bffba112a..ee4125077 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -4145,7 +4145,7 @@ void G_GPCupIntoRoundQueue(cupheader_t *cup, UINT8 setgametype, boolean setencor } } -static void G_GetNextMap(void) +void G_GetNextMap(void) { INT32 i; boolean setalready = false; diff --git a/src/g_game.h b/src/g_game.h index 55876e5df..a05d7ef0c 100644 --- a/src/g_game.h +++ b/src/g_game.h @@ -206,6 +206,7 @@ boolean G_GametypeHasSpectators(void); INT16 G_SometimesGetDifferentEncore(void); void G_ExitLevel(void); void G_NextLevel(void); +void G_GetNextMap(void); void G_Continue(void); void G_UseContinue(void); void G_AfterIntermission(void); diff --git a/src/k_podium.c b/src/k_podium.c index 7b658c944..630048e98 100644 --- a/src/k_podium.c +++ b/src/k_podium.c @@ -35,6 +35,7 @@ #include "y_inter.h" #include "m_cond.h" #include "p_local.h" +#include "p_saveg.h" #include "p_setup.h" #include "st_stuff.h" // hud hiding #include "fastcmp.h" @@ -252,6 +253,12 @@ boolean K_StartCeremony(void) maptol = mapheaderinfo[gamemap-1]->typeoflevel; globalweather = mapheaderinfo[gamemap-1]->weather; + if (savedata.lives > 0) + { + K_LoadGrandPrixSaveGame(); + savedata.lives = 0; + } + // Make sure all of the GAME OVER'd players can spawn // and be present for the podium for (i = 0; i < MAXPLAYERS; i++) diff --git a/src/menus/play-char-select.c b/src/menus/play-char-select.c index c88512926..837f81527 100644 --- a/src/menus/play-char-select.c +++ b/src/menus/play-char-select.c @@ -5,6 +5,7 @@ #include "../r_skins.h" #include "../s_sound.h" #include "../k_grandprix.h" // K_CanChangeRules +#include "../k_podium.h" // K_StartCeremony #include "../m_cond.h" // Condition Sets #include "../r_local.h" // SplitScreen_OnChange #include "../m_misc.h" // FIL_FileExists @@ -530,19 +531,49 @@ static void M_GPBackup(INT32 choice) SplitScreen_OnChange(); } - const UINT8 entry = roundqueue.position-1; + UINT8 entry = roundqueue.position-1; SV_StartSinglePlayerServer(roundqueue.entries[entry].gametype, false); - D_MapChange( - roundqueue.entries[entry].mapnum + 1, - roundqueue.entries[entry].gametype, - roundqueue.entries[entry].encore, - true, - 1, - false, - roundqueue.entries[entry].rankrestricted - ); + // Skip Bonus rounds. + if (roundqueue.entries[entry].gametype != roundqueue.entries[0].gametype + && roundqueue.entries[entry].rankrestricted == false) + { + G_GetNextMap(); // updates position in the roundqueue + entry = roundqueue.position-1; + } + + if (entry < roundqueue.size) + { + D_MapChange( + roundqueue.entries[entry].mapnum + 1, + roundqueue.entries[entry].gametype, + roundqueue.entries[entry].encore, + true, + 1, + false, + roundqueue.entries[entry].rankrestricted + ); + } + else + { + if (K_StartCeremony() == false) + { + // Accomodate our buffoonery with the artificial fade. + wipegamestate = -1; + + M_StartMessage( + "Grand Prix Backup", + "The session is concluded!\n" + "You exited a final Bonus Round,\n" + "and the Podium failed to load.\n", + NULL, MM_NOTHING, NULL, NULL); + + G_HandleSaveLevel(true); + + return; + } + } M_ClearMenus(true);