This commit is contained in:
Anuken
2021-08-28 14:17:01 -04:00
parent 4d62b0321f
commit 9a7324ce54
2 changed files with 6 additions and 4 deletions
+1 -1
View File
@@ -465,7 +465,7 @@ public class Damage{
for(int dx = -trad; dx <= trad; dx++){
for(int dy = -trad; dy <= trad; dy++){
Tile tile = world.tile(Math.round(x / tilesize) + dx, Math.round(y / tilesize) + dy);
if(tile != null && tile.build != null && (team == null ||team.isEnemy(tile.team())) && Mathf.dst(dx, dy) <= trad){
if(tile != null && tile.build != null && (team == null ||team.isEnemy(tile.team())) && dx*dx + dy*dy <= trad){
tile.build.damage(damage);
}
}