diff options
-rw-r--r-- | engines/scumm/actor.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/engines/scumm/actor.cpp b/engines/scumm/actor.cpp index e6243b3a57..24ceb8bca8 100644 --- a/engines/scumm/actor.cpp +++ b/engines/scumm/actor.cpp @@ -1575,6 +1575,11 @@ void Actor::setActorCostume(int c) { void Actor::startWalkActor(int destX, int destY, int dir) { AdjustBoxResult abr; + if (!isInCurrentRoom() && _vm->_version >= 7) { + debug(0, "startWalkActor: attempting to walk actor %d who is not in this room", _number); + return; + } + if (_vm->_version <= 3) { abr.x = destX; abr.y = destY; @@ -1582,15 +1587,11 @@ void Actor::startWalkActor(int destX, int destY, int dir) { abr = adjustXYToBeInBox(destX, destY); } - if (!isInCurrentRoom()) { - if (_vm->_version <= 6) { - _pos.x = abr.x; - _pos.y = abr.y; - if (_ignoreTurns == false && dir != -1) - _facing = dir; - } else { - debug(0, "startWalkActor: attempting to walk actor %d who is not in this room", _number); - } + if (!isInCurrentRoom() && _vm->_version <= 6) { + _pos.x = abr.x; + _pos.y = abr.y; + if (_ignoreTurns == false && dir != -1) + _facing = dir; return; } |