From 0db22f2cff8c7034f17acb40b56ff2e2b5800558 Mon Sep 17 00:00:00 2001 From: Anuken Date: Sat, 28 Apr 2018 11:12:24 -0400 Subject: [PATCH] Fixed place mode visual bug --- core/src/io/anuke/mindustry/input/PlaceMode.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/io/anuke/mindustry/input/PlaceMode.java b/core/src/io/anuke/mindustry/input/PlaceMode.java index 219239f293..3ccb8ab161 100644 --- a/core/src/io/anuke/mindustry/input/PlaceMode.java +++ b/core/src/io/anuke/mindustry/input/PlaceMode.java @@ -300,8 +300,8 @@ public enum PlaceMode{ Lines.stroke(2f); Draw.color("placeInvalid"); Lines.crect( - px * t + (isX ? 0 : offset.x) + (ex < tx && isX ? t : 0) - (block.width == 3 && ex > tx && isX ? t : 0), - py * t + (isX ? offset.y : 0) + (ey < ty && !isX ? t : 0) - (block.height == 3 && ey > ty && !isX ? t : 0), + px * t + (isX ? 0 : offset.x) + (ex < tx && isX && block.width > 1 ? t : 0) - (block.width == 3 && ex > tx && isX ? t : 0), + py * t + (isX ? offset.y : 0) + (ey < ty && !isX && block.height > 1 ? t : 0) - (block.height == 3 && ey > ty && !isX ? t : 0), t*(isX ? 1 : block.width), t*(isX ? block.height : 1)); Draw.color("place");