From 46eaddc00f54cec28a856eccdb888b2ef9f58b6c Mon Sep 17 00:00:00 2001 From: Beny Date: Thu, 15 Oct 2020 09:09:48 +0200 Subject: [PATCH] Fix player height not updating on item moved - Closes #805 --- .../items/interactions/InteractionMultiHeight.java | 2 +- .../java/com/eu/habbo/habbohotel/rooms/Room.java | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionMultiHeight.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionMultiHeight.java index b24d2609..a2675b5c 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionMultiHeight.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionMultiHeight.java @@ -87,7 +87,7 @@ public class InteractionMultiHeight extends HabboItem { THashSet updatedUnits = new THashSet<>(); for (RoomUnit unit : unitsOnItem) { - if (unit.hasStatus(RoomUnitStatus.MOVE)) + if (unit.hasStatus(RoomUnitStatus.MOVE) && unit.getGoal() != tile) continue; this.getBaseItem().getMultiHeights(); diff --git a/src/main/java/com/eu/habbo/habbohotel/rooms/Room.java b/src/main/java/com/eu/habbo/habbohotel/rooms/Room.java index b2b56b6d..d7c19acc 100644 --- a/src/main/java/com/eu/habbo/habbohotel/rooms/Room.java +++ b/src/main/java/com/eu/habbo/habbohotel/rooms/Room.java @@ -782,13 +782,14 @@ public class Room implements Comparable, ISerialize, Runnable { } if(habbo.getRoomUnit().getCurrentLocation().is(x, y) && (oldZ != z || updated || oldRotation != habbo.getRoomUnit().getBodyRotation())) { - roomUnits.add(habbo.getRoomUnit()); + habbo.getRoomUnit().statusUpdate(true); + //roomUnits.add(habbo.getRoomUnit()); } } - if (!roomUnits.isEmpty()) { + /*if (!roomUnits.isEmpty()) { this.sendComposer(new RoomUserStatusComposer(roomUnits, true).compose()); - } + }*/ } public void updateBotsAt(short x, short y) { @@ -4684,9 +4685,9 @@ public class Room implements Comparable, ISerialize, Runnable { t.x, t.y, this.getHabbosAt(t.x, t.y) - .stream() - .filter(h -> !h.getRoomUnit().hasStatus(RoomUnitStatus.MOVE)) - .collect(Collectors.toCollection(THashSet::new)) + /*.stream() + .filter(h -> !h.getRoomUnit().hasStatus(RoomUnitStatus.MOVE) || h.getRoomUnit().getGoal() == t) + .collect(Collectors.toCollection(THashSet::new))*/ ); this.updateBotsAt(t.x, t.y); }