From 1d29d5ac6945593f09be455f9c200e174b056434 Mon Sep 17 00:00:00 2001 From: Misa Date: Mon, 22 Jan 2024 13:14:36 -0800 Subject: [PATCH] Allow overriding state lock in glitchrunner <= 2.2 This fixes a regression where attempting to warp to ship with a trinket text box open in glitchrunner 2.0, and then incrementing the gamestate afterwards, would result in a softlock. This is a speedrunning strat that speedrunners use. The state lock wasn't ever intended to remove any strats or anything, just fix warping to ship under normal circumstances. So it's okay to re-enable interrupting the state by having glitchrunner enabled. This bug was reported by mohoc in the VVVVVV Speedrunning Discord server. --- desktop_version/src/Game.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/desktop_version/src/Game.cpp b/desktop_version/src/Game.cpp index 7474cf73..ab08d0b2 100644 --- a/desktop_version/src/Game.cpp +++ b/desktop_version/src/Game.cpp @@ -793,7 +793,7 @@ void Game::savetele_textbox(void) void Game::setstate(const int gamestate) { - if (!statelocked) + if (!statelocked || GlitchrunnerMode_less_than_or_equal(Glitchrunner2_2)) { state = gamestate; } @@ -801,7 +801,7 @@ void Game::setstate(const int gamestate) void Game::incstate(void) { - if (!statelocked) + if (!statelocked || GlitchrunnerMode_less_than_or_equal(Glitchrunner2_2)) { state++; } @@ -809,7 +809,7 @@ void Game::incstate(void) void Game::setstatedelay(const int delay) { - if (!statelocked) + if (!statelocked || GlitchrunnerMode_less_than_or_equal(Glitchrunner2_2)) { statedelay = delay; }