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

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;

View File

@@ -487,6 +487,7 @@ public class BlockRenderer{
}
public void updateShadow(Building build){
if(build.tile == null) return;
int size = build.block.size, of = build.block.sizeOffset, tx = build.tile.x, ty = build.tile.y;
for(int x = 0; x < size; x++){

View File

@@ -48,6 +48,4 @@ public class LiquidJunction extends LiquidBlock{
return next.getLiquidDestination(this, liquid);
}
}
}