Faster avoidance calculation
This commit is contained in:
@@ -56,10 +56,17 @@ public class DebugCollisionRenderer{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(debugDrawAvoidance && tile != null){
|
||||
int[] avoid = avoidance.getAvoidance();
|
||||
if(avoid != null && avoid[tile.array()] != 0){
|
||||
Draw.color(0f, 1f, 1f, 0.25f);
|
||||
Fill.square(tile.worldx(), tile.worldy(), 4f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Groups.draw.each(d -> {
|
||||
if(d instanceof Unit u && rect.overlaps(Tmp.r1.setCentered(u.x, u.y, d.clipSize())) && !u.isFlying()){
|
||||
u.hitboxTile(Tmp.r1);
|
||||
|
||||
Reference in New Issue
Block a user