Fixed #7677
This commit is contained in:
@@ -237,11 +237,14 @@ public class PowerNode extends PowerBlock{
|
|||||||
}
|
}
|
||||||
|
|
||||||
var worldRange = laserRange * tilesize;
|
var worldRange = laserRange * tilesize;
|
||||||
team.data().buildingTree.intersect(tile.worldx() - worldRange, tile.worldy() - worldRange, worldRange * 2, worldRange * 2, build -> {
|
var tree = team.data().buildingTree;
|
||||||
if(valid.get(build) && !tempBuilds.contains(build)){
|
if(tree != null){
|
||||||
tempBuilds.add(build);
|
tree.intersect(tile.worldx() - worldRange, tile.worldy() - worldRange, worldRange * 2, worldRange * 2, build -> {
|
||||||
}
|
if(valid.get(build) && !tempBuilds.contains(build)){
|
||||||
});
|
tempBuilds.add(build);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
tempBuilds.sort((a, b) -> {
|
tempBuilds.sort((a, b) -> {
|
||||||
int type = -Boolean.compare(a.block instanceof PowerNode, b.block instanceof PowerNode);
|
int type = -Boolean.compare(a.block instanceof PowerNode, b.block instanceof PowerNode);
|
||||||
@@ -290,11 +293,14 @@ public class PowerNode extends PowerBlock{
|
|||||||
}
|
}
|
||||||
|
|
||||||
var rangeWorld = maxRange * tilesize;
|
var rangeWorld = maxRange * tilesize;
|
||||||
team.data().buildingTree.intersect(tile.worldx() - rangeWorld, tile.worldy() - rangeWorld, rangeWorld * 2, rangeWorld * 2, build -> {
|
var tree = team.data().buildingTree;
|
||||||
if(valid.get(build) && !tempBuilds.contains(build)){
|
if(tree != null){
|
||||||
tempBuilds.add(build);
|
tree.intersect(tile.worldx() - rangeWorld, tile.worldy() - rangeWorld, rangeWorld * 2, rangeWorld * 2, build -> {
|
||||||
}
|
if(valid.get(build) && !tempBuilds.contains(build)){
|
||||||
});
|
tempBuilds.add(build);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
tempBuilds.sort((a, b) -> {
|
tempBuilds.sort((a, b) -> {
|
||||||
int type = -Boolean.compare(a.block instanceof PowerNode, b.block instanceof PowerNode);
|
int type = -Boolean.compare(a.block instanceof PowerNode, b.block instanceof PowerNode);
|
||||||
|
|||||||
Reference in New Issue
Block a user