1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-23 10:09:43 +01:00

Restrict the ENTER menu to saving while in a cutscene

PR #468 made it so you can use the menus while in a cutscene, in order
to counteract softlocks. However, this has resulted in more
unintentional behavior:
- `gamemode(teleporter)` breaks when opening the ENTER menu (Misa
  mentioned this)
- The player can now interrupt shakes and walks, and have their timers
  run out before resuming the cutscene
- After completing the game, the player can warp to the ship while a
  dialogue is active, and prevent themselves from advancing text (plus
  it's always rude to just teleport away while someone's talking)
- The player can peek at the map before hidecoordinates is run, and can
  also peek at what the game does with missing/rescued crewmates during
  cutscenes

This commit fixes the latter two issues. While a script is running,
only the SAVE tab is now available. Therefore the player can still get
themselves out of softlocks as intended, but they do things like
looking at the map or teleporting away during a cutscene.
This commit is contained in:
Dav999-v 2020-11-16 00:32:44 +01:00 committed by Ethan Lee
parent fb19787489
commit 679b590da5

View file

@ -2028,7 +2028,14 @@ void gameinput()
game.gamesaved = false; game.gamesaved = false;
game.gamesavefailed = false; game.gamesavefailed = false;
graphics.resumegamemode = false; graphics.resumegamemode = false;
game.menupage = 0; // The Map Page if (script.running)
{
game.menupage = 3; // Only allow saving
}
else
{
game.menupage = 0; // The Map Page
}
BlitSurfaceStandard(graphics.menubuffer,NULL,graphics.backBuffer, NULL); BlitSurfaceStandard(graphics.menubuffer,NULL,graphics.backBuffer, NULL);
graphics.menuoffset = 240; //actually this should count the roomname graphics.menuoffset = 240; //actually this should count the roomname
graphics.oldmenuoffset = 240; graphics.oldmenuoffset = 240;
@ -2221,7 +2228,11 @@ void mapinput()
game.jumpheld = true; game.jumpheld = true;
} }
if (game.press_left) if (script.running && game.menupage == 3)
{
// Force the player to stay in the SAVE tab while in a cutscene
}
else if (game.press_left)
{ {
game.menupage--; game.menupage--;
} }