aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2002-08-12 17:01:02 +0000
committerMax Horn2002-08-12 17:01:02 +0000
commit1ec9d7099723137356b8e8e879674ef2d474fa92 (patch)
tree81ea774dcc53d1a5da21a69a6b4baef1080ce8e3
parent15aa7f5a96f11674358e8aad66ba307f51af1c94 (diff)
downloadscummvm-rg350-1ec9d7099723137356b8e8e879674ef2d474fa92.tar.gz
scummvm-rg350-1ec9d7099723137356b8e8e879674ef2d474fa92.tar.bz2
scummvm-rg350-1ec9d7099723137356b8e8e879674ef2d474fa92.zip
fix for #591678. This may very well break other things, so if you experience weird problems with actor placement, or are suddenly not able to operate certain items, you know whom to blame
svn-id: r4730
-rw-r--r--actor.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/actor.cpp b/actor.cpp
index 4044760472..95e2fe3bfe 100644
--- a/actor.cpp
+++ b/actor.cpp
@@ -559,7 +559,7 @@ AdjustBoxResult Actor::adjustXYToBeInBox(int dstX, int dstY, int pathfrom)
uint threshold;
uint best;
int box, iterations = 0; /* Use iterations for those odd times we get stuck in the loop */
- int firstValidBox, j;
+ int firstValidBox, i, j;
byte flags, b;
if (_vm->_features & GF_SMALL_HEADER)
@@ -587,12 +587,12 @@ AdjustBoxResult Actor::adjustXYToBeInBox(int dstX, int dstY, int pathfrom)
if (!(_vm->_features & GF_OLD256) || box)
for (j = box; j >= firstValidBox; j--) {
- flags = _vm->getBoxFlags(j);
- if (flags & 0x80 && (!(flags & 0x20) || isInClass(31)))
- continue;
-
if (pathfrom >= firstValidBox) {
- int i = _vm->getPathToDestBox(pathfrom, j);
+ flags = _vm->getBoxFlags(j);
+ if (flags & 0x80 && (!(flags & 0x20) || isInClass(31)))
+ continue;
+
+ i = _vm->getPathToDestBox(pathfrom, j);
if (i == -1)
continue;