Make Special Stage map transitions respect nextmapoverride.
In other words: lets Luas set the next map of Special Stages via G_SetCustomExitVars. It's otherwise impossible to do so via Lua.
This commit is contained in:
parent
e340d74e4d
commit
ca4ed3b7dd
|
@ -3808,7 +3808,7 @@ static void G_DoCompleted(void)
|
||||||
// a map of the proper gametype -- skip levels that don't support
|
// a map of the proper gametype -- skip levels that don't support
|
||||||
// the current gametype. (Helps avoid playing boss levels in Race,
|
// the current gametype. (Helps avoid playing boss levels in Race,
|
||||||
// for instance).
|
// for instance).
|
||||||
if (!spec)
|
if (!spec || nextmapoverride)
|
||||||
{
|
{
|
||||||
if (nextmap >= 0 && nextmap < NUMMAPS)
|
if (nextmap >= 0 && nextmap < NUMMAPS)
|
||||||
{
|
{
|
||||||
|
@ -3860,6 +3860,7 @@ static void G_DoCompleted(void)
|
||||||
if (nextmap < 0 || (nextmap >= NUMMAPS && nextmap < 1100-1) || nextmap > 1103-1)
|
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);
|
I_Error("Followed map %d to invalid map %d\n", prevmap + 1, nextmap + 1);
|
||||||
|
|
||||||
|
if (!spec)
|
||||||
lastmap = nextmap; // Remember last map for when you come out of the special stage.
|
lastmap = nextmap; // Remember last map for when you come out of the special stage.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3881,7 +3882,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
|
nextmap = lastmap; // Exiting from a special stage? Go back to the game. Tails 08-11-2001
|
||||||
|
|
||||||
automapactive = false;
|
automapactive = false;
|
||||||
|
|
Loading…
Reference in a new issue