mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-24 21:41:25 -08:00
Fixed #4461
This commit is contained in:
parent
d0572a2a0d
commit
5a258d2830
1 changed files with 1 additions and 10 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue