mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-23 07:20:50 +01:00
Make teleporters work more like in Habbo
This commit is contained in:
parent
f774e73cf9
commit
892900af33
@ -230,7 +230,7 @@ public class InteractionTeleport extends HabboItem
|
||||
|
||||
this.roomUnitID = -1;
|
||||
habbo.getRoomUnit().isTeleporting = true;
|
||||
room.scheduledTasks.add(new TeleportActionOne(this, room, habbo.getClient()));
|
||||
Emulator.getThreading().run(new TeleportActionOne(this, room, habbo.getClient()), 500);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -36,23 +36,19 @@ public class InteractionTeleportTile extends InteractionTeleport
|
||||
@Override
|
||||
public void onWalkOn(RoomUnit roomUnit, Room room, Object[] objects) throws Exception
|
||||
{
|
||||
if (roomUnit != null)
|
||||
if (roomUnit != null && this.canWalkOn(roomUnit, room, objects))
|
||||
{
|
||||
RoomTile currentLocation = room.getLayout().getTile(this.getX(), this.getY());
|
||||
Habbo habbo = room.getHabbo(roomUnit);
|
||||
|
||||
if (roomUnit.getGoal().equals(currentLocation) && this.canWalkOn(roomUnit, room, objects))
|
||||
if (habbo != null)
|
||||
{
|
||||
Habbo habbo = room.getHabbo(roomUnit);
|
||||
if(!canUseTeleport(habbo.getClient(), room))
|
||||
return;
|
||||
|
||||
if (habbo != null)
|
||||
if (!habbo.getRoomUnit().isTeleporting)
|
||||
{
|
||||
if(!canUseTeleport(habbo.getClient(), room))
|
||||
return;
|
||||
|
||||
if (!habbo.getRoomUnit().isTeleporting)
|
||||
{
|
||||
this.startTeleport(room, habbo);
|
||||
}
|
||||
habbo.getRoomUnit().setGoalLocation(habbo.getRoomUnit().getCurrentLocation());
|
||||
this.startTeleport(room, habbo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user