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

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

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