aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--actor.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/actor.cpp b/actor.cpp
index f734733129..ee519379cd 100644
--- a/actor.cpp
+++ b/actor.cpp
@@ -589,14 +589,14 @@ AdjustBoxResult Actor::adjustXYToBeInBox(int dstX, int dstY, int pathfrom)
for (j = box; j >= firstValidBox; j--) {
flags = _vm->getBoxFlags(j);
- if (flags & kBoxLocked && (!(flags & kBoxPlayerOnly)))
- continue;
-
if (flags & kBoxInvisible && (!(flags & kBoxPlayerOnly) || isInClass(31)))
continue;
if (pathfrom >= firstValidBox) {
+ if (flags & kBoxLocked && (!(flags & kBoxPlayerOnly)))
+ continue;
+
i = _vm->getPathToDestBox(pathfrom, j);
if (i == -1)
continue;