mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2025-01-18 23:46:28 +01:00
Merge branch 'improvement/fix-bot-placement-height' into 'dev'
Fix for bot not sitting at right height when placing on a chair #1999 See merge request morningstar/Arcturus-Community!97
This commit is contained in:
commit
5f82c98c4c
@ -127,7 +127,7 @@ public class BotManager {
|
|||||||
roomUnit.setRotation(RoomUserRotation.SOUTH);
|
roomUnit.setRotation(RoomUserRotation.SOUTH);
|
||||||
roomUnit.setLocation(location);
|
roomUnit.setLocation(location);
|
||||||
|
|
||||||
double stackHeight = location.getStackHeight();
|
double stackHeight = room.getTopHeightAt(location.x, location.y);
|
||||||
roomUnit.setPreviousLocationZ(stackHeight);
|
roomUnit.setPreviousLocationZ(stackHeight);
|
||||||
roomUnit.setZ(stackHeight);
|
roomUnit.setZ(stackHeight);
|
||||||
|
|
||||||
|
@ -3636,7 +3636,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
|||||||
HabboItem item = this.getTopItemAt(x, y);
|
HabboItem item = this.getTopItemAt(x, y);
|
||||||
|
|
||||||
if (item != null)
|
if (item != null)
|
||||||
return (item.getZ() + Item.getCurrentHeight(item));
|
return (item.getZ() + Item.getCurrentHeight(item) - (item.getBaseItem().allowSit() ? 1 : 0));
|
||||||
else
|
else
|
||||||
return this.layout.getHeightAtSquare(x, y);
|
return this.layout.getHeightAtSquare(x, y);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user