From 4295f08a8494282fb351d450542415080e6c96cb Mon Sep 17 00:00:00 2001 From: Anuken Date: Fri, 2 Nov 2018 21:40:19 -0400 Subject: [PATCH] Fixed linked tiles sometimes being null --- core/src/io/anuke/mindustry/world/Tile.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/io/anuke/mindustry/world/Tile.java b/core/src/io/anuke/mindustry/world/Tile.java index c64043c917..f3fad923ef 100644 --- a/core/src/io/anuke/mindustry/world/Tile.java +++ b/core/src/io/anuke/mindustry/world/Tile.java @@ -278,7 +278,7 @@ public class Tile implements PosTrait, TargetTrait{ for(int dx = 0; dx < block.size; dx++){ for(int dy = 0; dy < block.size; dy++){ Tile other = world.tile(x + dx + offsetx, y + dy + offsety); - tmpArray.add(other); + if(other != null) tmpArray.add(other); } } }else{ @@ -299,7 +299,7 @@ public class Tile implements PosTrait, TargetTrait{ for(int dx = 0; dx < block.size; dx++){ for(int dy = 0; dy < block.size; dy++){ Tile other = world.tile(x + dx + offsetx, y + dy + offsety); - tmpArray.add(other); + if(other != null) tmpArray.add(other); } } }else{