aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/actor.cpp
diff options
context:
space:
mode:
authorTravis Howell2006-02-12 07:03:04 +0000
committerTravis Howell2006-02-12 07:03:04 +0000
commit2873ae81867e7b78a1b334abf0a65910c867b5b0 (patch)
treecd2a87dd019044c5bbb6ee9d30f8a52a0c7d536c /engines/scumm/actor.cpp
parent86ee0df205b267cc3bea1381dbafee8bb85d15ab (diff)
downloadscummvm-rg350-2873ae81867e7b78a1b334abf0a65910c867b5b0.tar.gz
scummvm-rg350-2873ae81867e7b78a1b334abf0a65910c867b5b0.tar.bz2
scummvm-rg350-2873ae81867e7b78a1b334abf0a65910c867b5b0.zip
Actually that should be before all code
svn-id: r20595
Diffstat (limited to 'engines/scumm/actor.cpp')
-rw-r--r--engines/scumm/actor.cpp19
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;
}