1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-01 18:43:33 +02:00

Use resumegamemode to track menu animation

This fixes a bug where the player could bring up the map on the very
first frame of a gamemode(game) animation. This is because the menu
animation checked graphics.menuoffset, but graphics.menuoffset wouldn't
have changed at that point because it only set graphics.resumegamemode.

Instead, just check for graphics.resumegamemode directly. We also need
to assign it to false whenever the map is closed so the player won't be
prevented from using the map screen again.
This commit is contained in:
Misa 2021-09-05 16:59:05 -07:00
parent da6c524db5
commit edf949bd9c
2 changed files with 2 additions and 3 deletions

View File

@ -6863,9 +6863,7 @@ void Game::unlockAchievement(const char *name) {
void Game::mapmenuchange(const int newgamestate, const bool user_initiated)
{
if (user_initiated
&& graphics.menuoffset > 0
&& graphics.menuoffset < 240)
if (user_initiated && graphics.resumegamemode)
{
return;
}

View File

@ -213,6 +213,7 @@ void maprenderfixed(void)
//go back to gamemode!
game.mapheld = true;
game.gamestate = GAMEMODE;
graphics.resumegamemode = false;
}
}
else