This commit is contained in:
Anuken 2021-11-02 09:04:37 -04:00
parent c4dc7e91f3
commit 99d30b6351
2 changed files with 3 additions and 2 deletions

View file

@ -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);
}
}

View file

@ -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