1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2025-01-09 10:29:45 +01:00

Add catch-all softlock protection

What this simply does is make it so that in the event that
game.hascontrol is somehow set to false when there isn't a cutscene
running (i.e. when game.state is 0 and script.running is false), it gets
set back to true again.

There's many ways to interrupt a gamestate and/or a running script, most
notably telejumping and doing a screen transition in the middle of the
animation, interrupting it.

This implements the first part of my idea in this comment:
https://github.com/TerryCavanagh/VVVVVV/issues/391#issuecomment-659757071
This commit is contained in:
Misa 2020-08-02 15:39:21 -07:00 committed by Ethan Lee
parent 563b10b666
commit 3aa407e981

View file

@ -649,6 +649,12 @@ void Game::updatestate()
{ {
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)
{
hascontrol = true;
}
break; break;
case 1: case 1:
//Game initilisation //Game initilisation