1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-22 17:49: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)
{
game.gamestate = TITLEMODE;
game.quittomenu();
game.createmenu(Menu::errorloadinglevel);
map.nexttowercolour();
graphics.fademode = FADE_START_FADEIN; /* start fade in */
music.currentsong = -1; /* otherwise music.play won't work */
music.play(6); /* title screen music */
}