From 404839bda620e27e99d4e9052ff02cbeb40406df Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Fri, 15 May 2015 11:13:13 +0200 Subject: TOON: Check for quitting in runEventScript() This keeps the game from hanging when trying to quit during Jim's gym demonstration. Hopefully any other effect of it is also good. --- engines/toon/toon.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp index 09f865f798..9e2905f454 100644 --- a/engines/toon/toon.cpp +++ b/engines/toon/toon.cpp @@ -1785,7 +1785,7 @@ int32 ToonEngine::runEventScript(int32 x, int32 y, int32 mode, int32 id, int32 s _currentScriptRegion++; _script->start(status, 1); - while (_script->run(status)) + while (_script->run(status) && !_shouldQuit) waitForScriptStep(); _currentScriptRegion--; -- cgit v1.2.3