Fix for being able to walk on furniture that has 8 rotations #1727

This commit is contained in:
Yordi 2024-10-17 16:57:25 +00:00 committed by ArpyAge
parent 0a6355996a
commit 8bc015c5b8

View File

@ -617,7 +617,7 @@ public class RoomLayout {
for (short j = tile.y; j <= (tile.y + (length - 1)); j++) {
RoomTile t = this.getTile(i, j);
if (t == null || t.state == RoomTileState.INVALID) {
if (t == null || t.getState() == RoomTileState.INVALID) {
return false;
}
}
@ -627,11 +627,16 @@ public class RoomLayout {
for (short j = tile.y; j <= (tile.y + (width - 1)); j++) {
RoomTile t = this.getTile(i, j);
if (t == null || t.state == RoomTileState.INVALID) {
if (t == null || t.getState() == RoomTileState.INVALID) {
return false;
}
}
}
} else if (rotation == 1 || rotation == 3 || rotation == 5 || rotation == 7) {
RoomTile t = this.getTile(tile.x, tile.y);
if (t == null || t.getState() == RoomTileState.INVALID) {
return false;
}
}
}
@ -662,9 +667,14 @@ public class RoomLayout {
}
}
}
} else if (rotation == 1 || rotation == 3 || rotation == 5 || rotation == 7) {
RoomTile t = this.getTile(tile.x, tile.y);
if (t != null) {
pointList.add(t);
}
}
}
return pointList;
}
}