From 73a5af2e5e65ea57185bb18c05261120c466147f Mon Sep 17 00:00:00 2001 From: azureblue Date: Sat, 24 Oct 2020 21:33:12 +0200 Subject: [PATCH] make ending direction follow the path --- core/src/mindustry/input/InputHandler.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/core/src/mindustry/input/InputHandler.java b/core/src/mindustry/input/InputHandler.java index 8d2c376e94..87695c48c0 100644 --- a/core/src/mindustry/input/InputHandler.java +++ b/core/src/mindustry/input/InputHandler.java @@ -1213,7 +1213,14 @@ public abstract class InputHandler implements InputProcessor, GestureListener{ line.x = point.x; line.y = point.y; if(!overrideLineRotation || diagonal){ - line.rotation = next != null ? Tile.relativeTo(point.x, point.y, next.x, next.y) : baseRotation; + if (next != null){ + line.rotation = Tile.relativeTo(point.x, point.y, next.x, next.y); + }else if (block.conveyorPlacement && i > 0){ + Point2 prev = points.get(i - 1); + line.rotation = Tile.relativeTo(prev.x, prev.y, point.x, point.y); + }else{ + line.rotation = baseRotation; + } }else{ line.rotation = rotation; }