diff options
author | Paul Gilbert | 2017-12-29 21:16:11 -0500 |
---|---|---|
committer | Paul Gilbert | 2017-12-29 21:16:11 -0500 |
commit | d0c04053dd2acce2a9afa675099d304cbf7c9a70 (patch) | |
tree | 44b6c0cca90f498e0a2a99ccd34ac1fe6989e28f /engines/xeen | |
parent | 9d336539b777fba380e980e0836d50d15b5e6704 (diff) | |
download | scummvm-rg350-d0c04053dd2acce2a9afa675099d304cbf7c9a70.tar.gz scummvm-rg350-d0c04053dd2acce2a9afa675099d304cbf7c9a70.tar.bz2 scummvm-rg350-d0c04053dd2acce2a9afa675099d304cbf7c9a70.zip |
XEEN: Fix intermittant crash leaving Dwarf Mine
Diffstat (limited to 'engines/xeen')
-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); } } |