From eda17df00c2a9600757bfbf2b85c587587ab6e16 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sat, 27 Feb 2010 18:54:21 +0000 Subject: Check if we should quit on every opcode call instead of after every 500. Fixes bug #2960238. svn-id: r48149 --- engines/made/script.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'engines') diff --git a/engines/made/script.cpp b/engines/made/script.cpp index 91b932cc92..de196f30e0 100644 --- a/engines/made/script.cpp +++ b/engines/made/script.cpp @@ -145,7 +145,7 @@ void ScriptInterpreter::runScript(int16 scriptObjectIndex) { _codeBase = _vm->_dat->getObject(_runningScriptObjectIndex)->getData(); _codeIp = _codeBase; - while (true) { + while (!_vm->shouldQuit()) { byte opcode = readByte(); if (opcode >= 1 && opcode <= _commandsMax) { @@ -160,9 +160,6 @@ void ScriptInterpreter::runScript(int16 scriptObjectIndex) { if (++opcodeSleepCounter > 500) { _vm->_screen->updateScreenAndWait(5); opcodeSleepCounter = 0; - if (_vm->shouldQuit()) { - break; - } } } -- cgit v1.2.3