Team#isEnemy is pointless

This commit is contained in:
Anuken
2023-05-21 03:59:08 -04:00
parent dc63112915
commit 564e81e734
4 changed files with 4 additions and 2 deletions

View File

@@ -600,7 +600,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())) && dx*dx + dy*dy <= trad*trad){
if(tile != null && tile.build != null && (team == null || team != tile.team()) && dx*dx + dy*dy <= trad*trad){
tile.build.damage(team, damage);
}
}