Permalink
Browse files

XEEN: Fix intermittant crash leaving Dwarf Mine

  • Loading branch information...
dreammaster committed Dec 30, 2017
1 parent 9d33653 commit d0c04053dd2acce2a9afa675099d304cbf7c9a70
Showing with 5 additions and 2 deletions.
  1. +5 −2 engines/xeen/scripts.cpp
View
@@ -468,7 +468,8 @@ bool Scripts::cmdTeleport(ParamsIterator &params) {
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 &params) {
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);
}
}

0 comments on commit d0c0405

Please sign in to comment.