Merge branch 'fix-nextlevel' into 'master'

Fix "advancemap next" going to GHZ at the end of a cup

See merge request KartKrew/Kart!44
This commit is contained in:
Sal 2018-10-16 18:08:04 -04:00
commit 1f1ba26aa7
1 changed files with 2 additions and 3 deletions

View File

@ -3413,6 +3413,8 @@ static void G_DoCompleted(void)
// nextmap is 0-based, unlike gamemap
if (nextmapoverride != 0)
nextmap = (INT16)(nextmapoverride-1);
else if (mapheaderinfo[gamemap-1]->nextlevel == 1101) // SRB2Kart: !!! WHENEVER WE GET GRAND PRIX, GO TO AWARDS MAP INSTEAD !!!
nextmap = (INT16)(mapheaderinfo[gamemap] ? gamemap : (spstage_start-1)); // (gamemap-1)+1 == gamemap :V
else
nextmap = (INT16)(mapheaderinfo[gamemap-1]->nextlevel-1);
@ -3441,9 +3443,6 @@ static void G_DoCompleted(void)
else
cm = (INT16)(mapheaderinfo[cm]->nextlevel-1);
if (cm == 1100-1) // !!! WHENEVER WE GET GRAND PRIX, GO TO AWARDS MAP INSTEAD !!!
cm = cm+1;
if (cm >= NUMMAPS || cm < 0) // out of range (either 1100-1102 or error)
{
cm = nextmap; //Start the loop again so that the error checking below is executed.