Fixed #6287
This commit is contained in:
@@ -461,11 +461,12 @@ public class Damage{
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static void completeDamage(Team team, float x, float y, float radius, float damage){
|
private static void completeDamage(Team team, float x, float y, float radius, float damage){
|
||||||
|
|
||||||
int trad = (int)(radius / tilesize);
|
int trad = (int)(radius / tilesize);
|
||||||
for(int dx = -trad; dx <= trad; dx++){
|
for(int dx = -trad; dx <= trad; dx++){
|
||||||
for(int dy = -trad; dy <= trad; dy++){
|
for(int dy = -trad; dy <= trad; dy++){
|
||||||
Tile tile = world.tile(Math.round(x / tilesize) + dx, Math.round(y / tilesize) + 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);
|
tile.build.damage(team, damage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -24,4 +24,4 @@ android.useAndroidX=true
|
|||||||
#used for slow jitpack builds; TODO see if this actually works
|
#used for slow jitpack builds; TODO see if this actually works
|
||||||
org.gradle.internal.http.socketTimeout=100000
|
org.gradle.internal.http.socketTimeout=100000
|
||||||
org.gradle.internal.http.connectionTimeout=100000
|
org.gradle.internal.http.connectionTimeout=100000
|
||||||
archash=7289b987eb5aae0999f561551d1b3bb50a195dc2
|
archash=ace698cee9e0ea2bc7993ffa44501122bd891b44
|
||||||
|
|||||||
Reference in New Issue
Block a user