1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-24 13:38:29 +02:00

Fix exiting No Death Mode being one menu too far back

I want exiting No Death Mode to go back to the "play modes" menu, not to
the "start game" menu, because it's too far back. Also do the same if
you either die or complete No Death Mode.

Also I initialized Game::wasinintermission, probably a good thing to
initialize variables.
This commit is contained in:
Misa 2020-04-27 12:27:12 -07:00 committed by Ethan Lee
parent 585ff51ec6
commit e92a21cf8a
3 changed files with 10 additions and 1 deletions

View File

@ -233,6 +233,8 @@ void Game::init(void)
createmenu(Menu::mainmenu);
wasintimetrial = false;
wasinintermission = false;
wasinnodeathmode = false;
wasincustommode = false;
deathcounts = 0;
@ -1353,6 +1355,10 @@ void Game::updatestate()
{
returntomenu(Menu::intermissionmenu);
}
else if (wasinnodeathmode)
{
returntomenu(Menu::playmodes);
}
else if (wasincustommode)
{
returntomenu(Menu::levellist);
@ -1367,6 +1373,7 @@ void Game::updatestate()
}
wasintimetrial = false;
wasinintermission = false;
wasinnodeathmode = false;
wasincustommode = false;
state = 0;
break;

View File

@ -237,6 +237,7 @@ public:
//Menu kludge...
bool wasintimetrial;
bool wasinintermission;
bool wasinnodeathmode;
bool wasincustommode;

View File

@ -1233,7 +1233,7 @@ void menuactionpress()
//back
music.playef(11);
music.play(6);
game.returnmenu();
game.returntomenu(Menu::playmodes);
map.nexttowercolour();
break;
case Menu::unlocktimetrials:
@ -1970,6 +1970,7 @@ void mapinput()
if (game.intimetrial || game.insecretlab || game.nodeathmode) game.menukludge = true;
game.wasintimetrial = game.intimetrial;
game.wasinintermission = game.inintermission;
game.wasinnodeathmode = game.nodeathmode;
game.wasincustommode = map.custommode;
script.hardreset();
if(graphics.setflipmode) graphics.flipmode = true;