From 5a258d2830d8b27bf1dc5ce7ea32ff04a8569146 Mon Sep 17 00:00:00 2001 From: Anuken Date: Thu, 28 Jan 2021 10:23:02 -0500 Subject: [PATCH] Fixed #4461 --- core/src/mindustry/world/blocks/power/PowerGraph.java | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/core/src/mindustry/world/blocks/power/PowerGraph.java b/core/src/mindustry/world/blocks/power/PowerGraph.java index 24873ecb14..abfdfbdaa3 100644 --- a/core/src/mindustry/world/blocks/power/PowerGraph.java +++ b/core/src/mindustry/world/blocks/power/PowerGraph.java @@ -291,15 +291,8 @@ public class PowerGraph{ } } - private void removeSingle(Building tile){ - all.remove(tile, true); - producers.remove(tile, true); - consumers.remove(tile, true); - batteries.remove(tile, true); - } - public void remove(Building tile){ - removeSingle(tile); + //begin by clearing the closed set closedSet.clear(); @@ -317,8 +310,6 @@ public class PowerGraph{ while(queue.size > 0){ //get child from queue Building child = queue.removeFirst(); - //remove it from this graph - removeSingle(child); //add it to the new branch graph graph.add(child); //go through connections