Actually that should be before all code

svn-id: r20595
This commit is contained in:
Travis Howell 2006-02-12 07:03:04 +00:00
parent 86ee0df205
commit 2873ae8186

View File

@ -1575,6 +1575,11 @@ void Actor::setActorCostume(int c) {
void Actor::startWalkActor(int destX, int destY, int dir) { void Actor::startWalkActor(int destX, int destY, int dir) {
AdjustBoxResult abr; 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) { if (_vm->_version <= 3) {
abr.x = destX; abr.x = destX;
abr.y = destY; abr.y = destY;
@ -1582,15 +1587,11 @@ void Actor::startWalkActor(int destX, int destY, int dir) {
abr = adjustXYToBeInBox(destX, destY); abr = adjustXYToBeInBox(destX, destY);
} }
if (!isInCurrentRoom()) { if (!isInCurrentRoom() && _vm->_version <= 6) {
if (_vm->_version <= 6) { _pos.x = abr.x;
_pos.x = abr.x; _pos.y = abr.y;
_pos.y = abr.y; if (_ignoreTurns == false && dir != -1)
if (_ignoreTurns == false && dir != -1) _facing = dir;
_facing = dir;
} else {
debug(0, "startWalkActor: attempting to walk actor %d who is not in this room", _number);
}
return; return;
} }