diff options
Diffstat (limited to 'engines/parallaction/exec_ns.cpp')
-rw-r--r-- | engines/parallaction/exec_ns.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/engines/parallaction/exec_ns.cpp b/engines/parallaction/exec_ns.cpp index 9bfbd81705..4f7db7749e 100644 --- a/engines/parallaction/exec_ns.cpp +++ b/engines/parallaction/exec_ns.cpp @@ -356,7 +356,8 @@ void CommandExec::runList(CommandList::iterator first, CommandList::iterator las uint32 useFlags = 0; bool useLocalFlags; - _ctxt.suspend = false; + _suspend = false; + _running = true; for ( ; first != last; first++) { if (_vm->shouldQuit()) @@ -385,12 +386,14 @@ void CommandExec::runList(CommandList::iterator first, CommandList::iterator las (*_opcodes[cmd->_id])(); - if (_ctxt.suspend) { + if (_suspend) { createSuspendList(++first, last); return; } } + _running = false; + } void CommandExec::run(CommandList& list, ZonePtr z) { @@ -427,6 +430,13 @@ void CommandExec::cleanSuspendedList() { _suspendedCtxt.zone = nullZonePtr; } +void CommandExec::suspend() { + if (!_running) + return; + + _suspend = true; +} + void CommandExec::runSuspended() { if (_engineFlags & kEngineWalking) { return; |