mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 09:28:15 +03: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:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user