mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49:43 +01: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:
parent
27aa10a18c
commit
a5eb361448
1 changed files with 2 additions and 1 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in a new issue