Fix Room Blocking. Thanks #TheJava for helping.

This commit is contained in:
KrewsOrg 2020-04-03 16:38:23 +01:00
parent 344bed8b3d
commit 4be2f0a8ba

View File

@ -300,7 +300,6 @@ public class RoomLayout {
double height = currentAdj.getStackHeight() - current.getStackHeight();
if (!ALLOW_FALLING && height < -MAXIMUM_STEP_HEIGHT) continue;
if (currentAdj.state == RoomTileState.OPEN && height > MAXIMUM_STEP_HEIGHT) continue;
if (currentAdj.hasUnits() && ((!isWalktroughRetry && !this.room.isAllowWalkthrough()) || currentAdj.equals(goalLocation))) {
closedList.add(currentAdj);
openList.remove(currentAdj);
@ -320,7 +319,7 @@ public class RoomLayout {
}
if (!this.room.isAllowWalkthrough() && !isWalktroughRetry) {
return this.findPath(oldTile, newTile, goalLocation, roomUnit, true);
return this.findPath(oldTile, newTile, goalLocation, roomUnit, false);
}
return null;