From 645ff56096ce6cc8ba1a369f80ba2b2a6587aaf0 Mon Sep 17 00:00:00 2001 From: Patrick 'Quezler' Mounier Date: Tue, 5 Nov 2019 07:29:48 +0100 Subject: [PATCH] Add comments --- core/src/io/anuke/mindustry/input/InputHandler.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/src/io/anuke/mindustry/input/InputHandler.java b/core/src/io/anuke/mindustry/input/InputHandler.java index b2f4ee4760..09459a5911 100644 --- a/core/src/io/anuke/mindustry/input/InputHandler.java +++ b/core/src/io/anuke/mindustry/input/InputHandler.java @@ -543,6 +543,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{ if(i[0]++ == 0 || i[0] == lineRequests.size){ // beginning & end should always be placed }else{ + // check with how many powernodes the *next* tile will overlap int overlaps = 0; for(int j = 0; j < i[0]; j++){ if (((PowerNode) req.block).overlaps(lineRequests.get(i[0]).tile(), lineRequests.get(j).tile()) && lineRequests.get(j).block instanceof PowerNode){ @@ -550,6 +551,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{ } } + // if its more than two it can bridge the gap if(overlaps > 1){ req.block = Blocks.air; }