This commit is contained in:
Anuken
2022-11-05 08:36:06 -04:00
parent bd0085a701
commit 0b7156ce13
3 changed files with 3 additions and 4 deletions
+2 -2
View File
@@ -355,8 +355,8 @@ public class BlockIndexer{
Team enemy = activeTeams.items[i];
if(enemy == team || (enemy == Team.derelict && !state.rules.coreCapture)) continue;
Building candidate = indexer.findTile(enemy, x, y, range, pred, true);
if(candidate == null || !candidate.isDiscovered(team)) continue;
Building candidate = indexer.findTile(enemy, x, y, range, b -> pred.get(b) && b.isDiscovered(team), true);
if(candidate == null) continue;
//if a block has the same priority, the closer one should be targeted
float dist = candidate.dst(x, y) - candidate.hitSize() / 2f;