From c63490623439ac7383d34eb88a6eec4a79accdf4 Mon Sep 17 00:00:00 2001 From: KrewsOrg Date: Sat, 4 May 2019 01:20:26 +0100 Subject: [PATCH] Learn to code John - Beny. --- .../java/com/eu/habbo/habbohotel/bots/BotManager.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) 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 5b4255f8..e762df0e 100644 --- a/src/main/java/com/eu/habbo/habbohotel/bots/BotManager.java +++ b/src/main/java/com/eu/habbo/habbohotel/bots/BotManager.java @@ -145,15 +145,9 @@ public class BotManager roomUnit.setLocation(location); HabboItem topItem = room.getTopItemAt(location.x, location.y); - if (topItem != null && !topItem.getBaseItem().allowSit()) - { - roomUnit.setZ(topItem.getZ() + Item.getCurrentHeight(topItem)); - } + if (topItem != null ) + roomUnit.setZ(topItem.getBaseItem().allowSit() ? topItem.getZ() : topItem.getZ() + Item.getCurrentHeight(topItem)); - if (topItem.getBaseItem().allowSit()) - { - roomUnit.setZ(topItem.getZ()); - } roomUnit.setPreviousLocationZ(roomUnit.getZ()); roomUnit.setPathFinderRoom(room); roomUnit.setRoomUnitType(RoomUnitType.BOT);