From bff9b850b72f0ebf0b4ff5dd4291ab70a84ea158 Mon Sep 17 00:00:00 2001 From: Info Teddy Date: Wed, 22 Jan 2020 16:16:27 -0800 Subject: [PATCH] Reset game.pausescript in hardreset() This fixes an issue where you could softlock the game if you exited playtesting mode by pressing Esc while a "- Press ACTION to advance text -" prompt was onscreen, then re-entered playtesting and then started any script. The "- Press ACTION to advance text -" prompt is most directly controlled by game.advancetext, but when it appears game.pausescript is usually set as well. You need to have both variables on at the same time in order to press ACTION. If only advancetext is on, then you won't be able to flip but can still move around, but if only pausescript is on, then the game softlocks because the only way you can turn pausescript off is by pressing ACTION, but the game will only let you press ACTION if *both* advancetext and pausescript are on. --- desktop_version/src/Script.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/desktop_version/src/Script.cpp b/desktop_version/src/Script.cpp index a88822ea..d8fd51ff 100644 --- a/desktop_version/src/Script.cpp +++ b/desktop_version/src/Script.cpp @@ -3496,6 +3496,8 @@ void scriptclass::hardreset( KeyPoll& key, Graphics& dwgfx, Game& game,mapclass& game.hascontrol = true; game.advancetext = false; + game.pausescript = false; + //dwgraphicsclass dwgfx.backgrounddrawn = false; dwgfx.textboxremovefast();