svn-id: r7756
This commit is contained in:
Max Horn 2003-05-20 23:05:34 +00:00
parent 4584cb9616
commit 34eee8b33b
3 changed files with 14 additions and 11 deletions

View file

@ -625,11 +625,12 @@ AdjustBoxResult Actor::adjustXYToBeInBox(int dstX, int dstY) {
bestDist = (uint) 0xFFFF;
bestBox = kInvalidBox;
// We iterate (backwards) over all boxes, searching the one closes
// We iterate (backwards) over all boxes, searching the one closest
// to the desired coordinates.
for (box = numBoxes; box >= firstValidBox; box--) {
flags = _vm->getBoxFlags(box);
// Skip over invisible boxes
if (flags & kBoxInvisible && !(flags & kBoxPlayerOnly && !isInClass(kObjectClassPlayer)))
continue;