mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-02-03 07:45:31 +03:00
Use quittomenu in gotoerrorloadinglevel
game.quittomenu() correctly resets state, as it's the function that's always used when quitting to menu. This fixes a bug where if a level with assets failed to load, it wouldn't unload the assets.
This commit is contained in:
@@ -2522,10 +2522,8 @@ void scriptclass::translate_dialogue(void)
|
|||||||
|
|
||||||
static void gotoerrorloadinglevel(void)
|
static void gotoerrorloadinglevel(void)
|
||||||
{
|
{
|
||||||
game.gamestate = TITLEMODE;
|
game.quittomenu();
|
||||||
game.createmenu(Menu::errorloadinglevel);
|
game.createmenu(Menu::errorloadinglevel);
|
||||||
map.nexttowercolour();
|
|
||||||
graphics.fademode = FADE_START_FADEIN; /* start fade in */
|
|
||||||
music.currentsong = -1; /* otherwise music.play won't work */
|
music.currentsong = -1; /* otherwise music.play won't work */
|
||||||
music.play(6); /* title screen music */
|
music.play(6); /* title screen music */
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user