diff options
Diffstat (limited to 'engines/draci/script.cpp')
| -rw-r--r-- | engines/draci/script.cpp | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/engines/draci/script.cpp b/engines/draci/script.cpp index 97dde39809..09c74f5e0d 100644 --- a/engines/draci/script.cpp +++ b/engines/draci/script.cpp @@ -634,8 +634,16 @@ void Script::stayOn(const Common::Array<int> ¶ms) { return; } - int x = params[0]; - int y = params[1]; + int x, y; + Common::Point afterLoadingPos = _vm->_game->getHeroLoadingPosition(); + if(_vm->_game->isPositionLoaded() == true) { + x = afterLoadingPos.x; + y = afterLoadingPos.y; + } + else { + x = params[0]; + y = params[1]; + } SightDirection dir = static_cast<SightDirection> (params[2]); // Jumps into the given position regardless of the walking map. @@ -670,6 +678,11 @@ void Script::walkOnPlay(const Common::Array<int> ¶ms) { return; } + if(_vm->_game->isPositionLoaded() == true) { + _vm->_game->setPositionLoaded(false); + return; + } + int x = params[0]; int y = params[1]; SightDirection dir = static_cast<SightDirection> (params[2]); @@ -687,6 +700,10 @@ void Script::newRoom(const Common::Array<int> ¶ms) { return; } + if(_vm->_game->isPositionLoaded() == true) { + _vm->_game->setPositionLoaded(false); + } + int room = params[0] - 1; int gate = params[1] - 1; |
