Learn to code John - Beny.

This commit is contained in:
KrewsOrg 2019-05-04 01:20:26 +01:00
parent 125164d3cd
commit c634906234

View File

@ -145,15 +145,9 @@ public class BotManager
roomUnit.setLocation(location); roomUnit.setLocation(location);
HabboItem topItem = room.getTopItemAt(location.x, location.y); HabboItem topItem = room.getTopItemAt(location.x, location.y);
if (topItem != null && !topItem.getBaseItem().allowSit()) if (topItem != null )
{ roomUnit.setZ(topItem.getBaseItem().allowSit() ? topItem.getZ() : topItem.getZ() + Item.getCurrentHeight(topItem));
roomUnit.setZ(topItem.getZ() + Item.getCurrentHeight(topItem));
}
if (topItem.getBaseItem().allowSit())
{
roomUnit.setZ(topItem.getZ());
}
roomUnit.setPreviousLocationZ(roomUnit.getZ()); roomUnit.setPreviousLocationZ(roomUnit.getZ());
roomUnit.setPathFinderRoom(room); roomUnit.setPathFinderRoom(room);
roomUnit.setRoomUnitType(RoomUnitType.BOT); roomUnit.setRoomUnitType(RoomUnitType.BOT);