1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-24 18:49:43 +01: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 ca35c53c1a
commit f467f86dc2
2 changed files with 2 additions and 3 deletions

View file

@ -6894,9 +6894,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

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