From df87b03e57c7463394e8572970bcf50ae354b315 Mon Sep 17 00:00:00 2001 From: Anuken Date: Sun, 9 Apr 2023 16:07:34 -0400 Subject: [PATCH] Fixed #8495 --- core/src/mindustry/world/Edges.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/src/mindustry/world/Edges.java b/core/src/mindustry/world/Edges.java index 956895e3c2..44b5a48175 100644 --- a/core/src/mindustry/world/Edges.java +++ b/core/src/mindustry/world/Edges.java @@ -50,11 +50,13 @@ public class Edges{ } public static Tile getFacingEdge(Building tile, Building other){ - return getFacingEdge(tile.block, tile.tileX(), tile.tileY(), other.tile()); + Tile res = getFacingEdge(tile.block, tile.tileX(), tile.tileY(), other.tile()); + return res == null ? tile.tile : res; } public static Tile getFacingEdge(Tile tile, Tile other){ - return getFacingEdge(tile.block, tile.x, tile.y, other); + Tile res = getFacingEdge(tile.block, tile.x, tile.y, other); + return res == null ? tile : res; } public static Tile getFacingEdge(Block block, int tilex, int tiley, Tile other){