mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-23 07:20:50 +01:00
Fix for bot not sitting at right height when placing on a chair, fixes issue #1999
This commit is contained in:
parent
1cc8674b18
commit
5f3099865a
@ -122,7 +122,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.getX(), location.getY());
|
||||||
roomUnit.setPreviousLocationZ(stackHeight);
|
roomUnit.setPreviousLocationZ(stackHeight);
|
||||||
roomUnit.setZ(stackHeight);
|
roomUnit.setZ(stackHeight);
|
||||||
|
|
||||||
|
@ -3063,11 +3063,11 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
|||||||
|
|
||||||
public double getTopHeightAt(int x, int y) {
|
public double getTopHeightAt(int x, int y) {
|
||||||
HabboItem item = this.getTopItemAt(x, y);
|
HabboItem item = this.getTopItemAt(x, y);
|
||||||
|
if (item != null) {
|
||||||
if (item != null)
|
return (item.getZ() + Item.getCurrentHeight(item) - (item.getBaseItem().allowSit() ? 1 : 0));
|
||||||
return (item.getZ() + Item.getCurrentHeight(item));
|
} else {
|
||||||
else
|
|
||||||
return this.layout.getHeightAtSquare(x, y);
|
return this.layout.getHeightAtSquare(x, y);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public HabboItem getLowestChair(RoomTile tile) {
|
public HabboItem getLowestChair(RoomTile tile) {
|
||||||
|
Loading…
Reference in New Issue
Block a user