mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Move script.hardreset() to after quit to menu
This cleans up a whole lot of kludge variables, because this aggressive hardreset() right as ACTION is pressed doesn't do anyone any favors. This aggressive hardreset() was probably here because of the whole fact that exiting to the menu uses Terry's State Machine, to minimize the chances of interruption, but it actually causes more issues and allows towers to interrupt the fadeout. And we should fix the root cause (the usage of the state machine) instead of patching together some kludge.
This commit is contained in:
@@ -135,7 +135,6 @@ void Game::init(void)
|
||||
|
||||
teleportscript = "";
|
||||
savemystats = false;
|
||||
menukludge = false;
|
||||
quickrestartkludge = false;
|
||||
|
||||
tapleft = 0;
|
||||
@@ -231,11 +230,6 @@ void Game::init(void)
|
||||
customleveltitle="";
|
||||
createmenu(Menu::mainmenu);
|
||||
|
||||
wasintimetrial = false;
|
||||
wasinintermission = false;
|
||||
wasinnodeathmode = false;
|
||||
wasincustommode = false;
|
||||
|
||||
deathcounts = 0;
|
||||
gameoverdelay = 0;
|
||||
frames = 0;
|
||||
@@ -7334,19 +7328,19 @@ void Game::quittomenu()
|
||||
//or "who do you want to play the level with?"
|
||||
//or "do you want cutscenes?"
|
||||
//or the confirm-load-quicksave menu
|
||||
if (wasintimetrial)
|
||||
if (intimetrial)
|
||||
{
|
||||
returntomenu(Menu::timetrials);
|
||||
}
|
||||
else if (wasinintermission)
|
||||
else if (inintermission)
|
||||
{
|
||||
returntomenu(Menu::intermissionmenu);
|
||||
}
|
||||
else if (wasinnodeathmode)
|
||||
else if (nodeathmode)
|
||||
{
|
||||
returntomenu(Menu::playmodes);
|
||||
}
|
||||
else if (wasincustommode)
|
||||
else if (map.custommode)
|
||||
{
|
||||
returntomenu(Menu::levellist);
|
||||
}
|
||||
@@ -7358,8 +7352,5 @@ void Game::quittomenu()
|
||||
{
|
||||
createmenu(Menu::mainmenu);
|
||||
}
|
||||
wasintimetrial = false;
|
||||
wasinintermission = false;
|
||||
wasinnodeathmode = false;
|
||||
wasincustommode = false;
|
||||
script.hardreset();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user