Skip to content

Commit

Permalink
Merge branch 'special-stage-respects-nextmapoverride' into 'next'
Browse files Browse the repository at this point in the history
Make Special Stage map transitions respect nextmapoverride.

See merge request STJr/SRB2!1129
  • Loading branch information
lachablock committed Sep 28, 2020
2 parents 27b7b5e + ca4ed3b commit ca2eb78
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/g_game.c
Original file line number Diff line number Diff line change
Expand Up @@ -3815,7 +3815,7 @@ static void G_DoCompleted(void)
// a map of the proper gametype -- skip levels that don't support
// the current gametype. (Helps avoid playing boss levels in Race,
// for instance).
if (!spec)
if (!spec || nextmapoverride)
{
if (nextmap >= 0 && nextmap < NUMMAPS)
{
Expand Down Expand Up @@ -3867,7 +3867,8 @@ static void G_DoCompleted(void)
if (nextmap < 0 || (nextmap >= NUMMAPS && nextmap < 1100-1) || nextmap > 1103-1)
I_Error("Followed map %d to invalid map %d\n", prevmap + 1, nextmap + 1);

lastmap = nextmap; // Remember last map for when you come out of the special stage.
if (!spec)
lastmap = nextmap; // Remember last map for when you come out of the special stage.
}

if ((gottoken = ((gametyperules & GTR_SPECIALSTAGES) && token)))
Expand All @@ -3888,7 +3889,7 @@ static void G_DoCompleted(void)
}
}

if (spec && !gottoken)
if (spec && !gottoken && !nextmapoverride)
nextmap = lastmap; // Exiting from a special stage? Go back to the game. Tails 08-11-2001

automapactive = false;
Expand Down

0 comments on commit ca2eb78

Please sign in to comment.