Fixed #7827
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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++){
|
||||
|
||||
@@ -48,6 +48,4 @@ public class LiquidJunction extends LiquidBlock{
|
||||
return next.getLiquidDestination(this, liquid);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user