Fixed wired teleporting breaks after teleporting from another room

This commit is contained in:
Yordi 2024-10-16 10:33:52 +02:00
parent 0a6355996a
commit 6d01947942

View File

@ -34,9 +34,14 @@ public class RoomUnitTeleport implements Runnable {
@Override @Override
public void run() { public void run() {
if (roomUnit == null || roomUnit.getRoom() == null || room.getLayout() == null || roomUnit.isLeavingTeleporter) if (roomUnit == null || roomUnit.getRoom() == null || room.getLayout() == null)
return; return;
if (roomUnit.isLeavingTeleporter) {
roomUnit.isWiredTeleporting = false;
return;
}
RoomTile lastLocation = this.roomUnit.getCurrentLocation(); RoomTile lastLocation = this.roomUnit.getCurrentLocation();
RoomTile newLocation = this.room.getLayout().getTile((short) this.x, (short) this.y); RoomTile newLocation = this.room.getLayout().getTile((short) this.x, (short) this.y);