This commit is contained in:
Anuken
2020-12-04 18:55:37 -05:00
parent 6af015cc05
commit 7ec3ab5a17
5 changed files with 71 additions and 45 deletions

View File

@@ -151,8 +151,17 @@ public class BaseGenerator{
//clear path for ground units
for(Tile tile : cores){
Astar.pathfind(tile, spawn, t -> t.team() == state.rules.waveTeam && !t.within(tile, 25f * 8) ? 100000 : t.floor().hasSurface() ? 1 : 10, t -> !t.block().isStatic()).each(t -> {
if(t.team() == state.rules.waveTeam && !t.within(tile, 25f * 8)){
t.setBlock(Blocks.air);
if(!t.within(tile, 25f * 8)){
if(t.team() == state.rules.waveTeam){
t.setBlock(Blocks.air);
}
for(Point2 p : Geometry.d8){
Tile other = t.nearby(p);
if(other != null && other.team() == state.rules.waveTeam){
other.setBlock(Blocks.air);
}
}
}
});
}