mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-23 15:20:52 +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;
|
this.roomUnitID = -1;
|
||||||
habbo.getRoomUnit().isTeleporting = true;
|
habbo.getRoomUnit().isTeleporting = true;
|
||||||
room.scheduledTasks.add(new TeleportActionOne(this, room, habbo.getClient()));
|
Emulator.getThreading().run(new TeleportActionOne(this, room, habbo.getClient()), 500);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -36,11 +36,7 @@ public class InteractionTeleportTile extends InteractionTeleport
|
|||||||
@Override
|
@Override
|
||||||
public void onWalkOn(RoomUnit roomUnit, Room room, Object[] objects) throws Exception
|
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());
|
|
||||||
|
|
||||||
if (roomUnit.getGoal().equals(currentLocation) && this.canWalkOn(roomUnit, room, objects))
|
|
||||||
{
|
{
|
||||||
Habbo habbo = room.getHabbo(roomUnit);
|
Habbo habbo = room.getHabbo(roomUnit);
|
||||||
|
|
||||||
@ -51,10 +47,10 @@ public class InteractionTeleportTile extends InteractionTeleport
|
|||||||
|
|
||||||
if (!habbo.getRoomUnit().isTeleporting)
|
if (!habbo.getRoomUnit().isTeleporting)
|
||||||
{
|
{
|
||||||
|
habbo.getRoomUnit().setGoalLocation(habbo.getRoomUnit().getCurrentLocation());
|
||||||
this.startTeleport(room, habbo);
|
this.startTeleport(room, habbo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user