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.
This commit is contained in:
Torbjörn Andersson 2015-05-15 11:13:13 +02:00
parent 915e65d949
commit 404839bda6

View File

@ -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--;