mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 18:19:43 +01:00
Fix unmounting assets exiting to menu resulting in silence
If you exited to the menu normally (i.e. got on a code path that went through Game::quittomenu()), the menu music wouldn't play. This is because FILESYSTEM_unmountassets() was put after music.play(6). So the game would play the custom level's track 6, and then unmount it, which meant it could no longer play track 6, but there's nothing telling the game to play track 6 again. So I just changed the frame ordering around. I also added a comment to make sure anyone reading the code is aware of the frame order dependency.
This commit is contained in:
parent
44bd4ec0b7
commit
fc265e3c75
1 changed files with 1 additions and 1 deletions
|
@ -7631,6 +7631,7 @@ void Game::quittomenu()
|
||||||
{
|
{
|
||||||
gamestate = TITLEMODE;
|
gamestate = TITLEMODE;
|
||||||
graphics.fademode = 4;
|
graphics.fademode = 4;
|
||||||
|
FILESYSTEM_unmountassets(); // should be before music.play(6)
|
||||||
music.play(6);
|
music.play(6);
|
||||||
graphics.backgrounddrawn = false;
|
graphics.backgrounddrawn = false;
|
||||||
map.tdrawback = true;
|
map.tdrawback = true;
|
||||||
|
@ -7669,7 +7670,6 @@ void Game::quittomenu()
|
||||||
createmenu(Menu::mainmenu);
|
createmenu(Menu::mainmenu);
|
||||||
}
|
}
|
||||||
script.hardreset();
|
script.hardreset();
|
||||||
FILESYSTEM_unmountassets();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Game::returntolab()
|
void Game::returntolab()
|
||||||
|
|
Loading…
Reference in a new issue