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

Fix softlock using tele while in its hitbox post-rescue/intermission

There were many different ways I could've fixed it, but one thing that
stood out to me was the fact that touching the teleporter wasn't
guaranteed to set its onentity to 0, even though it should be. So now,
every time Viridian touches the teleporter, the teleporter's onentity
will be set to 0, and thus there's no chance of the teleporter
interrupting its own teleport animation and softlocking the game.

We should still do what I suggested in #391, namely setting
game.hascontrol to true if the game is in gamestate 0 and script.running
is false, and also always allowing Esc/Enter to be pressed regardless of
game.hascontrol. But this softlock is fixed now.

Fixes #391.
This commit is contained in:
Misa 2020-07-17 13:29:22 -07:00 committed by Ethan Lee
parent af89c52813
commit df96b2a594

View file

@ -3209,7 +3209,6 @@ bool entityclass::updateentities( int i )
if (entities[i].tile == 1) if (entities[i].tile == 1)
{ {
music.playef(18); music.playef(18);
entities[i].onentity = 0;
entities[i].tile = 2; entities[i].tile = 2;
entities[i].colour = 101; entities[i].colour = 101;
if(!game.intimetrial && !game.nodeathmode) if(!game.intimetrial && !game.nodeathmode)
@ -3247,9 +3246,9 @@ bool entityclass::updateentities( int i )
{ {
game.savedir = entities[player].dir; game.savedir = entities[player].dir;
} }
entities[i].state = 0;
} }
entities[i].onentity = 0;
entities[i].state = 0; entities[i].state = 0;
} }
else if (entities[i].state == 2) else if (entities[i].state == 2)