From df96b2a594d01b78743e83a27cb056d563ad5ac1 Mon Sep 17 00:00:00 2001 From: Misa Date: Fri, 17 Jul 2020 13:29:22 -0700 Subject: [PATCH] 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. --- desktop_version/src/Entity.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/desktop_version/src/Entity.cpp b/desktop_version/src/Entity.cpp index 93522885..60441c6a 100644 --- a/desktop_version/src/Entity.cpp +++ b/desktop_version/src/Entity.cpp @@ -3209,7 +3209,6 @@ bool entityclass::updateentities( int i ) if (entities[i].tile == 1) { music.playef(18); - entities[i].onentity = 0; entities[i].tile = 2; entities[i].colour = 101; if(!game.intimetrial && !game.nodeathmode) @@ -3247,9 +3246,9 @@ bool entityclass::updateentities( int i ) { game.savedir = entities[player].dir; } - entities[i].state = 0; } + entities[i].onentity = 0; entities[i].state = 0; } else if (entities[i].state == 2)