mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 10:09:43 +01: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:
parent
585ff51ec6
commit
e92a21cf8a
3 changed files with 10 additions and 1 deletions
|
@ -233,6 +233,8 @@ void Game::init(void)
|
||||||
createmenu(Menu::mainmenu);
|
createmenu(Menu::mainmenu);
|
||||||
|
|
||||||
wasintimetrial = false;
|
wasintimetrial = false;
|
||||||
|
wasinintermission = false;
|
||||||
|
wasinnodeathmode = false;
|
||||||
wasincustommode = false;
|
wasincustommode = false;
|
||||||
|
|
||||||
deathcounts = 0;
|
deathcounts = 0;
|
||||||
|
@ -1353,6 +1355,10 @@ void Game::updatestate()
|
||||||
{
|
{
|
||||||
returntomenu(Menu::intermissionmenu);
|
returntomenu(Menu::intermissionmenu);
|
||||||
}
|
}
|
||||||
|
else if (wasinnodeathmode)
|
||||||
|
{
|
||||||
|
returntomenu(Menu::playmodes);
|
||||||
|
}
|
||||||
else if (wasincustommode)
|
else if (wasincustommode)
|
||||||
{
|
{
|
||||||
returntomenu(Menu::levellist);
|
returntomenu(Menu::levellist);
|
||||||
|
@ -1367,6 +1373,7 @@ void Game::updatestate()
|
||||||
}
|
}
|
||||||
wasintimetrial = false;
|
wasintimetrial = false;
|
||||||
wasinintermission = false;
|
wasinintermission = false;
|
||||||
|
wasinnodeathmode = false;
|
||||||
wasincustommode = false;
|
wasincustommode = false;
|
||||||
state = 0;
|
state = 0;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -237,6 +237,7 @@ public:
|
||||||
//Menu kludge...
|
//Menu kludge...
|
||||||
bool wasintimetrial;
|
bool wasintimetrial;
|
||||||
bool wasinintermission;
|
bool wasinintermission;
|
||||||
|
bool wasinnodeathmode;
|
||||||
bool wasincustommode;
|
bool wasincustommode;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1233,7 +1233,7 @@ void menuactionpress()
|
||||||
//back
|
//back
|
||||||
music.playef(11);
|
music.playef(11);
|
||||||
music.play(6);
|
music.play(6);
|
||||||
game.returnmenu();
|
game.returntomenu(Menu::playmodes);
|
||||||
map.nexttowercolour();
|
map.nexttowercolour();
|
||||||
break;
|
break;
|
||||||
case Menu::unlocktimetrials:
|
case Menu::unlocktimetrials:
|
||||||
|
@ -1970,6 +1970,7 @@ void mapinput()
|
||||||
if (game.intimetrial || game.insecretlab || game.nodeathmode) game.menukludge = true;
|
if (game.intimetrial || game.insecretlab || game.nodeathmode) game.menukludge = true;
|
||||||
game.wasintimetrial = game.intimetrial;
|
game.wasintimetrial = game.intimetrial;
|
||||||
game.wasinintermission = game.inintermission;
|
game.wasinintermission = game.inintermission;
|
||||||
|
game.wasinnodeathmode = game.nodeathmode;
|
||||||
game.wasincustommode = map.custommode;
|
game.wasincustommode = map.custommode;
|
||||||
script.hardreset();
|
script.hardreset();
|
||||||
if(graphics.setflipmode) graphics.flipmode = true;
|
if(graphics.setflipmode) graphics.flipmode = true;
|
||||||
|
|
Loading…
Reference in a new issue