aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/made/script.cpp5
1 files changed, 1 insertions, 4 deletions
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;
- }
}
}