diff --git a/core/src/io/anuke/mindustry/graphics/MinimapRenderer.java b/core/src/io/anuke/mindustry/graphics/MinimapRenderer.java index 516203cee4..790792d824 100644 --- a/core/src/io/anuke/mindustry/graphics/MinimapRenderer.java +++ b/core/src/io/anuke/mindustry/graphics/MinimapRenderer.java @@ -72,7 +72,7 @@ public class MinimapRenderer implements Disposable{ region = new TextureRegion(texture); } - public void drawEntities(float x, float y, float w, float h){ + public void drawEntities(float x, float y, float w, float h, boolean withLabels){ updateUnitArray(); float sz = baseSize * zoom; @@ -87,7 +87,7 @@ public class MinimapRenderer implements Disposable{ float rx = (unit.x - rect.x) / rect.width * w, ry = (unit.y - rect.y) / rect.width * h; Draw.color(unit.getTeam().color); - if (unit.getTypeID() == TypeIDs.player) { + if (withLabels && unit instanceof Player) { Player pl = (Player) unit; if (!pl.isLocal) { // Only display names for other players. @@ -101,6 +101,10 @@ public class MinimapRenderer implements Disposable{ Draw.color(); } + public void drawEntities(float x, float y, float w, float h){ + drawEntities(x, y, w, h, true); + } + public TextureRegion getRegion(){ if(texture == null) return null; diff --git a/core/src/io/anuke/mindustry/ui/Minimap.java b/core/src/io/anuke/mindustry/ui/Minimap.java index d4cba3bc33..dc2817e8f0 100644 --- a/core/src/io/anuke/mindustry/ui/Minimap.java +++ b/core/src/io/anuke/mindustry/ui/Minimap.java @@ -36,7 +36,7 @@ public class Minimap extends Table{ Draw.rect(renderer.minimap.getRegion(), x + width / 2f, y + height / 2f, width, height); if(renderer.minimap.getTexture() != null){ - renderer.minimap.drawEntities(x, y, width, height); + renderer.minimap.drawEntities(x, y, width, height, false); } } }).size(140f);