diff --git a/core/src/mindustry/graphics/MinimapRenderer.java b/core/src/mindustry/graphics/MinimapRenderer.java index 3636c0c342..c28a44b7ec 100644 --- a/core/src/mindustry/graphics/MinimapRenderer.java +++ b/core/src/mindustry/graphics/MinimapRenderer.java @@ -123,7 +123,7 @@ public class MinimapRenderer{ rect.set((dx - sz) * tilesize, (dy - sz) * tilesize, sz * 2 * tilesize, sz * 2 * tilesize); for(Unit unit : units){ - if(unit.inFogTo(player.team())) continue; + if(unit.inFogTo(player.team()) || !unit.type.drawMinimap) continue; float rx = !withLabels ? (unit.x - rect.x) / rect.width * w : unit.x / (world.width() * tilesize) * w; float ry = !withLabels ? (unit.y - rect.y) / rect.width * h : unit.y / (world.height() * tilesize) * h; diff --git a/core/src/mindustry/type/UnitType.java b/core/src/mindustry/type/UnitType.java index 58a9ae756a..401e426d47 100644 --- a/core/src/mindustry/type/UnitType.java +++ b/core/src/mindustry/type/UnitType.java @@ -226,7 +226,9 @@ public class UnitType extends UnlockableContent{ /** if false, the unit shield (usually seen in waves) is not drawn. */ drawShields = true, /** if false, the unit body is not drawn. */ - drawBody = true; + drawBody = true, + /** if false, the unit is not drawn on the minimap. */ + drawMinimap = true; /** The default AI controller to assign on creation. */ public Prov aiController = () -> !flying ? new GroundAI() : new FlyingAI(); diff --git a/core/src/mindustry/type/unit/MissileUnitType.java b/core/src/mindustry/type/unit/MissileUnitType.java index 7142064995..33b06aa6b6 100644 --- a/core/src/mindustry/type/unit/MissileUnitType.java +++ b/core/src/mindustry/type/unit/MissileUnitType.java @@ -37,6 +37,7 @@ public class MissileUnitType extends UnitType{ fogRadius = 2f; loopSound = Sounds.missileTrail; loopSoundVolume = 0.05f; + drawMinimap = false; //TODO weapon configs, etc? } }