From f585d53955527cb4a55f5269c69362f35b5680be Mon Sep 17 00:00:00 2001 From: Misa Date: Sat, 9 May 2020 11:41:54 -0700 Subject: [PATCH] Fix flag 67 turning on too early Flag 67 seems to be a general-purpose Game Complete flag. It's used to replace the CREW option with the SHIP option on the pause screen. Unfortunately, it gets turned on too early during Game Complete. Right when Viridian starts to teleport, you can bring up the pause screen and select the SHIP option. It will teleport you to the ship coordinates, but still keep you in finalmode, and since the ship coordinates are at 102,111 (finalmode is only around 46,54), you'll still be stuck in Outside Dimension VVVVVV, and you've interrupted the Game Complete gamestate by switching to the teleporting gamestate. Oh, and your checkpoint is set, too, so you can't even press R. Oh and since there's no teleporter, and checkpoint setting doesn't check the sentinel value, this results in Undefined Behavior, too. So this results in an in-game softlock. The only option you can do is quit the game at this point. To fix this issue, just move turning on flag 67 before the savetele() in gamecompletelogic2(). --- desktop_version/src/Game.cpp | 2 -- desktop_version/src/Logic.cpp | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/desktop_version/src/Game.cpp b/desktop_version/src/Game.cpp index b979d6bb..7fb3a4af 100644 --- a/desktop_version/src/Game.cpp +++ b/desktop_version/src/Game.cpp @@ -3282,8 +3282,6 @@ void Game::updatestate() i = obj.getplayer(); obj.entities[i].colour = 102; - obj.flags[67] = true; - state++; statedelay = 30; flashlight = 5; diff --git a/desktop_version/src/Logic.cpp b/desktop_version/src/Logic.cpp index 9ca91f24..92e2e853 100644 --- a/desktop_version/src/Logic.cpp +++ b/desktop_version/src/Logic.cpp @@ -102,6 +102,7 @@ void gamecompletelogic2() game.deletequick(); int tmp=music.currentsong; music.currentsong=4; + obj.flags[67] = true; game.savetele(); music.currentsong=tmp; //Return to game