diff --git a/core/src/mindustry/entities/Damage.java b/core/src/mindustry/entities/Damage.java index 8dcea7cbb2..52a2f0d6c7 100644 --- a/core/src/mindustry/entities/Damage.java +++ b/core/src/mindustry/entities/Damage.java @@ -461,11 +461,12 @@ public class Damage{ } private static void completeDamage(Team team, float x, float y, float radius, float damage){ + int trad = (int)(radius / tilesize); 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())) && dx*dx + dy*dy <= trad){ + if(tile != null && tile.build != null && (team == null ||team.isEnemy(tile.team())) && dx*dx + dy*dy <= trad*trad){ tile.build.damage(team, damage); } } diff --git a/gradle.properties b/gradle.properties index a7fc8bc057..0d1105982b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -24,4 +24,4 @@ android.useAndroidX=true #used for slow jitpack builds; TODO see if this actually works org.gradle.internal.http.socketTimeout=100000 org.gradle.internal.http.connectionTimeout=100000 -archash=7289b987eb5aae0999f561551d1b3bb50a195dc2 +archash=ace698cee9e0ea2bc7993ffa44501122bd891b44