Add delay to teleport tiles

This commit is contained in:
Alejandro 2019-05-30 19:26:42 +03:00
parent c943cd016d
commit 775ec86974
2 changed files with 6 additions and 2 deletions

View File

@ -204,12 +204,16 @@ public class InteractionTeleport extends HabboItem {
} }
public void startTeleport(Room room, Habbo habbo) { public void startTeleport(Room room, Habbo habbo) {
this.startTeleport(room, habbo, 500);
}
public void startTeleport(Room room, Habbo habbo, int delay) {
if (habbo.getRoomUnit().isTeleporting) if (habbo.getRoomUnit().isTeleporting)
return; return;
this.roomUnitID = -1; this.roomUnitID = -1;
habbo.getRoomUnit().isTeleporting = true; habbo.getRoomUnit().isTeleporting = true;
Emulator.getThreading().run(new TeleportActionOne(this, room, habbo.getClient()), 500); Emulator.getThreading().run(new TeleportActionOne(this, room, habbo.getClient()), delay);
} }
@Override @Override

View File

@ -38,7 +38,7 @@ public class InteractionTeleportTile extends InteractionTeleport {
if (!habbo.getRoomUnit().isTeleporting) { if (!habbo.getRoomUnit().isTeleporting) {
habbo.getRoomUnit().setGoalLocation(habbo.getRoomUnit().getCurrentLocation()); habbo.getRoomUnit().setGoalLocation(habbo.getRoomUnit().getCurrentLocation());
this.startTeleport(room, habbo); this.startTeleport(room, habbo, 1000);
} }
} }
} }