diff --git a/src/main/java/com/eu/habbo/habbohotel/bots/BotManager.java b/src/main/java/com/eu/habbo/habbohotel/bots/BotManager.java index 1c9951f4..be39101f 100644 --- a/src/main/java/com/eu/habbo/habbohotel/bots/BotManager.java +++ b/src/main/java/com/eu/habbo/habbohotel/bots/BotManager.java @@ -122,7 +122,7 @@ public class BotManager { roomUnit.setRotation(RoomUserRotation.SOUTH); roomUnit.setLocation(location); - double stackHeight = location.getStackHeight(); + double stackHeight = room.getTopHeightAt(location.getX(), location.getY()); roomUnit.setPreviousLocationZ(stackHeight); roomUnit.setZ(stackHeight); diff --git a/src/main/java/com/eu/habbo/habbohotel/rooms/Room.java b/src/main/java/com/eu/habbo/habbohotel/rooms/Room.java index 0ffda9fa..4275bac9 100644 --- a/src/main/java/com/eu/habbo/habbohotel/rooms/Room.java +++ b/src/main/java/com/eu/habbo/habbohotel/rooms/Room.java @@ -3063,11 +3063,11 @@ public class Room implements Comparable, ISerialize, Runnable { public double getTopHeightAt(int x, int y) { HabboItem item = this.getTopItemAt(x, y); - - if (item != null) - return (item.getZ() + Item.getCurrentHeight(item)); - else + if (item != null) { + return (item.getZ() + Item.getCurrentHeight(item) - (item.getBaseItem().allowSit() ? 1 : 0)); + } else { return this.layout.getHeightAtSquare(x, y); + } } public HabboItem getLowestChair(RoomTile tile) {