mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 10:09:43 +01:00
Fix softlocks from turning off advancetext at wrong time
When a text box in the script system (not the gamestate system) is displayed onscreen and "- Press ACTION to advance text -" is up, the game sets pausescript to true, so the script system won't blare past the text box and keep executing. Then it also sets advancetext to true. Crucially, these two variables are different, so if you have pausescript true but advancetext false, then what happens? Well, you get softlocked. There's no way to continue the script. How is this possible? Well, you can teleport to the (0,0) teleporter (the teleporter in the very top-left of the map) and regain control during the teleporter animation. To do that, in 2.2 and below, you have to press R at the same time you press Enter on the teleporter, or in 2.3 you can simply press R during the cutscene. Then once you teleport to the room, it's really precise and a bit difficult (especially if Viridian is invisible), but you can quickly walk over to the terminal in that room and press Enter on it. Then what will happen is the terminal script will run, but the teleporter gamestate sequence will finish and turn advancetext off in the middle of it. And then you're softlocked. To fix this, just add a check so if we're in gamestate 0 and there's a script running, but we have pausescript on and advancetext off, just turn pausescript off so the game automatically advances the script. This softlock was reported by Tzann on the VVVVVV speedrunning Discord.
This commit is contained in:
parent
fe8df3001e
commit
bc0b9e1fa0
1 changed files with 10 additions and 2 deletions
|
@ -735,9 +735,17 @@ void Game::updatestate(void)
|
||||||
case 0:
|
case 0:
|
||||||
//Do nothing here! Standard game state
|
//Do nothing here! Standard game state
|
||||||
|
|
||||||
//Prevent softlocks if there's no cutscene running right now
|
if (script.running)
|
||||||
if (!script.running)
|
|
||||||
{
|
{
|
||||||
|
if (pausescript && !advancetext)
|
||||||
|
{
|
||||||
|
/* Prevent softlocks if we somehow don't have advancetext */
|
||||||
|
pausescript = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Prevent softlocks if there's no cutscene running right now */
|
||||||
hascontrol = true;
|
hascontrol = true;
|
||||||
completestop = false;
|
completestop = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue