Stankman Easter Egg

This commit is contained in:
Stankman 2023-08-02 17:45:43 -05:00
parent 83d1436983
commit e11def5965
2 changed files with 15 additions and 3 deletions

View File

@ -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<RoomUnitStatus, String> 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();
}

View File

@ -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);
}
}