mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-12-15 15:20:57 -08:00
Fixed #6287
This commit is contained in:
parent
c4dc7e91f3
commit
99d30b6351
2 changed files with 3 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue