mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-22 23:10:52 +01:00
Fix sometimes incorrect Habbo height on item pickup
This commit is contained in:
parent
1b97707bc7
commit
c590e49ff1
@ -735,23 +735,22 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
||||
|
||||
THashSet<RoomUnit> roomUnits = new THashSet<>();
|
||||
for (Habbo habbo : habbos) {
|
||||
|
||||
double z = habbo.getRoomUnit().getCurrentLocation().getStackHeight();
|
||||
|
||||
if ((item == null && !habbo.getRoomUnit().cmdSit) || (item != null && !item.getBaseItem().allowSit()))
|
||||
habbo.getRoomUnit().removeStatus(RoomUnitStatus.SIT);
|
||||
|
||||
if ((item == null && !habbo.getRoomUnit().cmdLay) || (item != null && !item.getBaseItem().allowLay()))
|
||||
habbo.getRoomUnit().removeStatus(RoomUnitStatus.LAY);
|
||||
|
||||
if (item != null) {
|
||||
if (item.getBaseItem().allowSit() || item.getBaseItem().allowLay()) {
|
||||
habbo.getRoomUnit().setZ(item.getZ());
|
||||
habbo.getRoomUnit().setPreviousLocationZ(item.getZ());
|
||||
habbo.getRoomUnit().setRotation(RoomUserRotation.fromValue(item.getRotation()));
|
||||
} else {
|
||||
habbo.getRoomUnit().setZ(item.getZ() + Item.getCurrentHeight(item));
|
||||
}
|
||||
if (item != null && (item.getBaseItem().allowSit() || item.getBaseItem().allowLay())) {
|
||||
habbo.getRoomUnit().setZ(item.getZ());
|
||||
habbo.getRoomUnit().setPreviousLocationZ(item.getZ());
|
||||
habbo.getRoomUnit().setRotation(RoomUserRotation.fromValue(item.getRotation()));
|
||||
} else {
|
||||
habbo.getRoomUnit().setZ(habbo.getRoomUnit().getCurrentLocation().getStackHeight());
|
||||
habbo.getRoomUnit().setPreviousLocationZ(habbo.getRoomUnit().getCurrentLocation().getStackHeight());
|
||||
habbo.getRoomUnit().setZ(z);
|
||||
habbo.getRoomUnit().setPreviousLocationZ(z);
|
||||
}
|
||||
roomUnits.add(habbo.getRoomUnit());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user