diff --git a/core/src/mindustry/entities/type/base/GroundUnit.java b/core/src/mindustry/entities/type/base/GroundUnit.java index d680fa230a..56ba404a30 100644 --- a/core/src/mindustry/entities/type/base/GroundUnit.java +++ b/core/src/mindustry/entities/type/base/GroundUnit.java @@ -237,7 +237,7 @@ public class GroundUnit extends BaseUnit{ protected void moveAwayFromCore(){ Team enemy = null; - for(Team team : Vars.team.enemies()){ + for(Team team : team.enemies()){ if(team.active()){ enemy = team; break; @@ -245,7 +245,7 @@ public class GroundUnit extends BaseUnit{ } if(enemy == null){ - for(Team team : Vars.team.enemies()){ + for(Team team : team.enemies()){ enemy = team; break; } diff --git a/core/src/mindustry/game/Team.java b/core/src/mindustry/game/Team.java index b6b608d5d0..f5b02e4d9a 100644 --- a/core/src/mindustry/game/Team.java +++ b/core/src/mindustry/game/Team.java @@ -31,7 +31,7 @@ public class Team implements Comparable{ static{ //create the whole 256 placeholder teams for(int i = 6; i < all.length; i++){ - new Team(i, "team#" + i, Color.HSVtoRGB(360f * (float)(i) / all.length, 100f, 100f, 1f)); + new Team(i, "team#" + i, Color.HSVtoRGB(360f * (float)(i) / all.length * 10, 100f * 0.8f, 100f * 0.8f, 1f)); } } @@ -91,4 +91,9 @@ public class Team implements Comparable{ public int compareTo(Team team){ return Integer.compare(id, team.id); } + + @Override + public String toString(){ + return name; + } }