mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 09:28:15 +03:00
Set TITLEMODE if loading level results in error
After the scriptclass::startgamemode refactor, a lot of common code is still being executed even if the level loading failed. This sets the game-gamestate to TITLEMODE in gotoerrorloadinglevel(), and also returns early just in case. Fixes #975.
This commit is contained in:
@@ -2522,6 +2522,7 @@ void scriptclass::translate_dialogue(void)
|
||||
|
||||
static void gotoerrorloadinglevel(void)
|
||||
{
|
||||
game.gamestate = TITLEMODE;
|
||||
game.createmenu(Menu::errorloadinglevel);
|
||||
map.nexttowercolour();
|
||||
graphics.fademode = FADE_START_FADEIN; /* start fade in */
|
||||
@@ -2832,7 +2833,7 @@ void scriptclass::startgamemode(const enum StartMode mode)
|
||||
if (!cl.load(filename))
|
||||
{
|
||||
gotoerrorloadinglevel();
|
||||
break;
|
||||
return;
|
||||
}
|
||||
cl.findstartpoint();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user