diff options
author | Travis Howell | 2006-02-12 07:03:04 +0000 |
---|---|---|
committer | Travis Howell | 2006-02-12 07:03:04 +0000 |
commit | 2873ae81867e7b78a1b334abf0a65910c867b5b0 (patch) | |
tree | cd2a87dd019044c5bbb6ee9d30f8a52a0c7d536c | |
parent | 86ee0df205b267cc3bea1381dbafee8bb85d15ab (diff) | |
download | scummvm-rg350-2873ae81867e7b78a1b334abf0a65910c867b5b0.tar.gz scummvm-rg350-2873ae81867e7b78a1b334abf0a65910c867b5b0.tar.bz2 scummvm-rg350-2873ae81867e7b78a1b334abf0a65910c867b5b0.zip |
Actually that should be before all code
svn-id: r20595
-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; } |