1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-23 01:59:43 +01: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:
Misa 2023-05-17 11:45:21 -07:00
parent 9387186083
commit 28ef3dd7bf

View file

@ -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 */
} }