Fixed Teleports breaking when you pick one up before teleporting is completed.

This commit is contained in:
KrewsOrg 2019-05-10 03:46:32 +01:00
parent 104368006d
commit 58feeb998c

View File

@ -39,7 +39,10 @@ class TeleportActionThree implements Runnable
} }
if(targetRoom == null) if(targetRoom == null)
{
Emulator.getThreading().run(new TeleportActionFive(this.currentTeleport, this.room, this.client), 0);
return; return;
}
if (targetRoom.isPreLoaded()) if (targetRoom.isPreLoaded())
{ {
@ -49,7 +52,10 @@ class TeleportActionThree implements Runnable
targetTeleport = targetRoom.getHabboItem(((InteractionTeleport) this.currentTeleport).getTargetId()); targetTeleport = targetRoom.getHabboItem(((InteractionTeleport) this.currentTeleport).getTargetId());
if(targetTeleport == null) if(targetTeleport == null)
{
Emulator.getThreading().run(new TeleportActionFive(this.currentTeleport, this.room, this.client), 0);
return; return;
}
RoomTile teleportLocation = targetRoom.getLayout().getTile(targetTeleport.getX(), targetTeleport.getY()); RoomTile teleportLocation = targetRoom.getLayout().getTile(targetTeleport.getX(), targetTeleport.getY());