mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-27 00:40:52 +01:00
Merge branch '10-update-pet_data' into 'dev'
Bot Height is now fixed on placing on rooms with multiple z heights. Sitting... See merge request morningstar/Arcturus-Community!11
This commit is contained in:
commit
c542f62463
@ -144,11 +144,8 @@ public class BotManager
|
|||||||
roomUnit.setRotation(RoomUserRotation.SOUTH);
|
roomUnit.setRotation(RoomUserRotation.SOUTH);
|
||||||
roomUnit.setLocation(location);
|
roomUnit.setLocation(location);
|
||||||
HabboItem topItem = room.getTopItemAt(location.x, location.y);
|
HabboItem topItem = room.getTopItemAt(location.x, location.y);
|
||||||
|
roomUnit.setZ(roomUnit.getCurrentLocation().getStackHeight());
|
||||||
if (topItem != null )
|
roomUnit.setPreviousLocationZ(roomUnit.getCurrentLocation().getStackHeight());
|
||||||
roomUnit.setZ(topItem.getBaseItem().allowSit() ? topItem.getZ() : topItem.getZ() + Item.getCurrentHeight(topItem));
|
|
||||||
|
|
||||||
roomUnit.setPreviousLocationZ(roomUnit.getZ());
|
|
||||||
roomUnit.setPathFinderRoom(room);
|
roomUnit.setPathFinderRoom(room);
|
||||||
roomUnit.setRoomUnitType(RoomUnitType.BOT);
|
roomUnit.setRoomUnitType(RoomUnitType.BOT);
|
||||||
roomUnit.setCanWalk(room.isAllowBotsWalk());
|
roomUnit.setCanWalk(room.isAllowBotsWalk());
|
||||||
@ -164,6 +161,7 @@ public class BotManager
|
|||||||
|
|
||||||
if (topItem != null)
|
if (topItem != null)
|
||||||
{
|
{
|
||||||
|
roomUnit.setZ(topItem.getBaseItem().allowSit() ? topItem.getZ() : topItem.getZ() + Item.getCurrentHeight(topItem));
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
topItem.onWalkOn(bot.getRoomUnit(), room, null);
|
topItem.onWalkOn(bot.getRoomUnit(), room, null);
|
||||||
|
Loading…
Reference in New Issue
Block a user