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.
This commit is contained in:
Misa 2024-01-22 13:14:36 -08:00 committed by Misa Elizabeth Kai
parent ac42e7f774
commit 8d2a0c2457
1 changed files with 3 additions and 3 deletions

View File

@ -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;
}