Fixed wired teleporting breaks after teleporting from another room

This commit is contained in:
Harmonic 2022-05-05 05:42:17 -07:00
parent 27af901b11
commit f8aaec7fa7

View File

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