Enabled fast click walk

This commit is contained in:
Stankman 2023-08-02 16:39:03 -05:00
parent a56abbed35
commit 83d1436983

View File

@ -19,6 +19,8 @@ public class MoveAvatarEvent extends MessageHandler {
int x = this.packet.readInt();
int y = this.packet.readInt();
log.info("CLICKED ON TILE [x]: {} [y]: {}", x, y);
Habbo habbo = this.client.getHabbo();
if(habbo == null) {
@ -37,7 +39,8 @@ public class MoveAvatarEvent extends MessageHandler {
return;
}
if (roomHabbo.getCurrentPosition().equals(x,y)) {
if (roomHabbo.getCurrentPosition().equals(x,y) && roomHabbo.isAtGoal()) {
return;
}
@ -60,7 +63,6 @@ public class MoveAvatarEvent extends MessageHandler {
return;
}
log.info("CLICKED ON TILE [x]: {} [y]: {}", tile.getX(), tile.getY());
roomHabbo.walkTo(tile);
}
}