mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 10:09: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:
parent
da6c524db5
commit
edf949bd9c
2 changed files with 2 additions and 3 deletions
|
@ -6863,9 +6863,7 @@ void Game::unlockAchievement(const char *name) {
|
||||||
|
|
||||||
void Game::mapmenuchange(const int newgamestate, const bool user_initiated)
|
void Game::mapmenuchange(const int newgamestate, const bool user_initiated)
|
||||||
{
|
{
|
||||||
if (user_initiated
|
if (user_initiated && graphics.resumegamemode)
|
||||||
&& graphics.menuoffset > 0
|
|
||||||
&& graphics.menuoffset < 240)
|
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -213,6 +213,7 @@ void maprenderfixed(void)
|
||||||
//go back to gamemode!
|
//go back to gamemode!
|
||||||
game.mapheld = true;
|
game.mapheld = true;
|
||||||
game.gamestate = GAMEMODE;
|
game.gamestate = GAMEMODE;
|
||||||
|
graphics.resumegamemode = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue