Fix player height not updating on item moved - Closes #805

This commit is contained in:
Beny 2020-10-15 09:09:48 +02:00
parent 0d9d4eda61
commit 46eaddc00f
2 changed files with 8 additions and 7 deletions

View File

@ -87,7 +87,7 @@ public class InteractionMultiHeight extends HabboItem {
THashSet<RoomUnit> updatedUnits = new THashSet<>(); THashSet<RoomUnit> updatedUnits = new THashSet<>();
for (RoomUnit unit : unitsOnItem) { for (RoomUnit unit : unitsOnItem) {
if (unit.hasStatus(RoomUnitStatus.MOVE)) if (unit.hasStatus(RoomUnitStatus.MOVE) && unit.getGoal() != tile)
continue; continue;
this.getBaseItem().getMultiHeights(); this.getBaseItem().getMultiHeights();

View File

@ -782,13 +782,14 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
} }
if(habbo.getRoomUnit().getCurrentLocation().is(x, y) && (oldZ != z || updated || oldRotation != habbo.getRoomUnit().getBodyRotation())) { 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()); this.sendComposer(new RoomUserStatusComposer(roomUnits, true).compose());
} }*/
} }
public void updateBotsAt(short x, short y) { public void updateBotsAt(short x, short y) {
@ -4684,9 +4685,9 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
t.x, t.x,
t.y, t.y,
this.getHabbosAt(t.x, t.y) this.getHabbosAt(t.x, t.y)
.stream() /*.stream()
.filter(h -> !h.getRoomUnit().hasStatus(RoomUnitStatus.MOVE)) .filter(h -> !h.getRoomUnit().hasStatus(RoomUnitStatus.MOVE) || h.getRoomUnit().getGoal() == t)
.collect(Collectors.toCollection(THashSet::new)) .collect(Collectors.toCollection(THashSet::new))*/
); );
this.updateBotsAt(t.x, t.y); this.updateBotsAt(t.x, t.y);
} }