Better team building presence check

This commit is contained in:
Anuken
2022-04-17 19:59:36 -04:00
parent eb299f5ec7
commit 224b1b022a
4 changed files with 46 additions and 41 deletions

View File

@@ -211,7 +211,7 @@ public class Units{
buildResult = null;
cdist = 0f;
var buildings = team.data().buildings;
var buildings = team.data().buildingTree;
if(buildings == null) return null;
buildings.intersect(wx - range, wy - range, range*2f, range*2f, b -> {
if(pred.get(b)){
@@ -466,7 +466,7 @@ public class Units{
if(other.tree().any(x, y, width, height)){
return true;
}
if(other.turrets != null && other.turrets.any(x, y, width, height)){
if(other.turretTree != null && other.turretTree.any(x, y, width, height)){
return true;
}
}