diff options
| -rw-r--r-- | engines/xeen/scripts.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/engines/xeen/scripts.cpp b/engines/xeen/scripts.cpp index 74b7eb3f5c..59e12f6289 100644 --- a/engines/xeen/scripts.cpp +++ b/engines/xeen/scripts.cpp @@ -468,7 +468,8 @@ bool Scripts::cmdTeleport(ParamsIterator ¶ms) { Sound &sound = *_vm->_sound; windows.closeAll(); - + + bool restartFlag = _event->_opcode == OP_TeleportAndContinue; int mapId = params.readByte(); Common::Point pt; @@ -519,11 +520,13 @@ bool Scripts::cmdTeleport(ParamsIterator ¶ms) { events.clearEvents(); - if (_event->_opcode == OP_TeleportAndContinue) { + if (restartFlag) { + // Draw the new location and start any script at that location intf.draw3d(true); _lineNum = 0; return true; } else { + // Stop executing the script return cmdExit(params); } } |
