diff --git a/src/main/java/com/eu/habbo/habbohotel/rooms/entities/units/RoomUnit.java b/src/main/java/com/eu/habbo/habbohotel/rooms/entities/units/RoomUnit.java index 8803282b..6ecdb699 100644 --- a/src/main/java/com/eu/habbo/habbohotel/rooms/entities/units/RoomUnit.java +++ b/src/main/java/com/eu/habbo/habbohotel/rooms/entities/units/RoomUnit.java @@ -57,6 +57,8 @@ public abstract class RoomUnit extends RoomEntity { private boolean isSwimming = false; @Setter private boolean cmdFastWalkEnabled; + @Setter + private boolean temporalFastWalkEnabled; private final ConcurrentHashMap statuses; @Setter private boolean statusUpdateNeeded; @@ -118,6 +120,8 @@ public abstract class RoomUnit extends RoomEntity { public void cycle() { if(this.isWalking()) { this.processWalking(); + } else { + this.stopWalking(); } }; @@ -144,12 +148,18 @@ public abstract class RoomUnit extends RoomEntity { public void stopWalking() { synchronized (this.statuses) { - this.path.clear(); + if(this.path != null) { + this.path.clear(); + } + this.nextPosition = null; this.targetPosition = null; + this.removeStatus(RoomUnitStatus.MOVE); this.handleSitStatus(); this.handleLayStatus(); + + this.temporalFastWalkEnabled = false; } } @@ -489,7 +499,7 @@ public abstract class RoomUnit extends RoomEntity { if(!this.path.isEmpty()) { RoomTile next = this.path.poll(); - if(this.path.size() > 1 && this.cmdFastWalkEnabled) { + if(this.path.size() > 1 && (this.cmdFastWalkEnabled || this.temporalFastWalkEnabled)) { next = this.path.poll(); } diff --git a/src/main/java/com/eu/habbo/messages/incoming/rooms/users/MoveAvatarEvent.java b/src/main/java/com/eu/habbo/messages/incoming/rooms/users/MoveAvatarEvent.java index 3f2d183d..b5ca2447 100644 --- a/src/main/java/com/eu/habbo/messages/incoming/rooms/users/MoveAvatarEvent.java +++ b/src/main/java/com/eu/habbo/messages/incoming/rooms/users/MoveAvatarEvent.java @@ -39,7 +39,6 @@ public class MoveAvatarEvent extends MessageHandler { return; } - if (roomHabbo.getCurrentPosition().equals(x,y) && roomHabbo.isAtGoal()) { return; } @@ -63,6 +62,9 @@ public class MoveAvatarEvent extends MessageHandler { return; } + //STANKMAN EASTER EGG + roomHabbo.setTemporalFastWalkEnabled(roomHabbo.getTargetPosition() != null && roomHabbo.getTargetPosition().equals(tile)); + roomHabbo.walkTo(tile); } }