Skip to content

Commit

Permalink
Allow overriding state lock in glitchrunner <= 2.2
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
InfoTeddy committed Jan 22, 2024
1 parent 67f5698 commit 1d29d5a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions desktop_version/src/Game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -793,23 +793,23 @@ void Game::savetele_textbox(void)

void Game::setstate(const int gamestate)
{
if (!statelocked)
if (!statelocked || GlitchrunnerMode_less_than_or_equal(Glitchrunner2_2))
{
state = gamestate;
}
}

void Game::incstate(void)
{
if (!statelocked)
if (!statelocked || GlitchrunnerMode_less_than_or_equal(Glitchrunner2_2))
{
state++;
}
}

void Game::setstatedelay(const int delay)
{
if (!statelocked)
if (!statelocked || GlitchrunnerMode_less_than_or_equal(Glitchrunner2_2))
{
statedelay = delay;
}
Expand Down

0 comments on commit 1d29d5a

Please sign in to comment.