aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2002-07-15 18:11:30 +0000
committerMax Horn2002-07-15 18:11:30 +0000
commit44c3cf058930530b0e2c00b907584ba8477f0dc3 (patch)
tree37b4136452c3bd4b6c4b4bb8eadf992f07f80935
parent191c808a48ca97454c9c1af9f88623f28d5416cb (diff)
downloadscummvm-rg350-44c3cf058930530b0e2c00b907584ba8477f0dc3.tar.gz
scummvm-rg350-44c3cf058930530b0e2c00b907584ba8477f0dc3.tar.bz2
scummvm-rg350-44c3cf058930530b0e2c00b907584ba8477f0dc3.zip
tiny fix to account for the fact that GF_SMALL_HEADER games have walk box 0
svn-id: r4554
-rw-r--r--actor.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/actor.cpp b/actor.cpp
index 865fdeb62d..d323db6f82 100644
--- a/actor.cpp
+++ b/actor.cpp
@@ -601,7 +601,7 @@ AdjustBoxResult Actor::adjustXYToBeInBox(int dstX, int dstY, int pathfrom)
if (flags & 0x80 && (!(flags & 0x20) || _vm->getClass(number, 0x1F)))
continue;
- if (pathfrom && (_vm->getPathToDestBox(pathfrom, j) == -1))
+ if (pathfrom >= firstValidBox && (_vm->getPathToDestBox(pathfrom, j) == -1))
continue;
if (!_vm->inBoxQuickReject(j, dstX, dstY, threshold))
@@ -637,6 +637,7 @@ AdjustBoxResult Actor::adjustXYToBeInBox(int dstX, int dstY, int pathfrom)
threshold = (threshold == 30) ? 80 : 0;
}
}
+
return abr;
}
@@ -645,7 +646,7 @@ void Actor::adjustActorPos()
AdjustBoxResult abr;
byte flags;
- abr = adjustXYToBeInBox(x, y, 0);
+ abr = adjustXYToBeInBox(x, y, -1);
x = abr.x;
y = abr.y;