From 6a6e80b6d8ce731d15ae38423ab32a316c9b54fe Mon Sep 17 00:00:00 2001 From: Anuken Date: Thu, 20 Sep 2018 18:25:55 -0400 Subject: [PATCH] Fixed multiblock erase bug --- core/src/io/anuke/mindustry/editor/MapEditor.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/src/io/anuke/mindustry/editor/MapEditor.java b/core/src/io/anuke/mindustry/editor/MapEditor.java index bf500af100..ffdaa551b5 100644 --- a/core/src/io/anuke/mindustry/editor/MapEditor.java +++ b/core/src/io/anuke/mindustry/editor/MapEditor.java @@ -105,8 +105,8 @@ public class MapEditor{ return; } - byte writeID = (byte) drawBlock.id; - byte partID = (byte) Blocks.blockpart.id; + byte writeID = drawBlock.id; + byte partID = Blocks.blockpart.id; byte rotationTeam = Bits.packByte(drawBlock.rotate ? (byte) rotation : 0, drawBlock.synthetic() ? (byte) drawTeam.ordinal() : 0); boolean isfloor = drawBlock instanceof Floor && drawBlock != Blocks.air; @@ -171,7 +171,9 @@ public class MapEditor{ if(!isfloor){ byte link = map.read(wx, wy, DataPosition.link); - if(link != 0){ + if(content.block(map.read(wx, wy, DataPosition.wall)).isMultiblock()){ + removeLinked(wx, wy); + }else if(link != 0){ removeLinked(wx - (Bits.getLeftByte(link) - 8), wy - (Bits.getRightByte(link) - 8)); } }