From 8bc015c5b859a35ac92ad3ed769967d5b669c50b Mon Sep 17 00:00:00 2001 From: Yordi Date: Thu, 17 Oct 2024 16:57:25 +0000 Subject: [PATCH] Fix for being able to walk on furniture that has 8 rotations #1727 --- .../eu/habbo/habbohotel/rooms/RoomLayout.java | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/eu/habbo/habbohotel/rooms/RoomLayout.java b/src/main/java/com/eu/habbo/habbohotel/rooms/RoomLayout.java index 7459e42a..f3b6eab8 100644 --- a/src/main/java/com/eu/habbo/habbohotel/rooms/RoomLayout.java +++ b/src/main/java/com/eu/habbo/habbohotel/rooms/RoomLayout.java @@ -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; } + }