Merge pull request #774 from InfoTeddy/general-bug-fixes-4

Prevent losing level data with rollcredits
This commit is contained in:
Terry Cavanagh
2021-06-12 22:33:17 +10:30
committed by GitHub

View File

@@ -1567,10 +1567,21 @@ void scriptclass::run(void)
} }
else if (words[0] == "rollcredits") else if (words[0] == "rollcredits")
{ {
#if !defined(NO_CUSTOM_LEVELS) && !defined(NO_EDITOR)
if (map.custommode && !map.custommodeforreal)
{
game.returntoeditor();
ed.note = "Rolled credits";
ed.notedelay = 45;
}
else
#endif
{
game.gamestate = GAMECOMPLETE; game.gamestate = GAMECOMPLETE;
graphics.fademode = 4; graphics.fademode = 4;
game.creditposition = 0; game.creditposition = 0;
} }
}
else if (words[0] == "finalmode") else if (words[0] == "finalmode")
{ {
map.finalmode = true; map.finalmode = true;