Hide missiles on minimap
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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<? extends UnitController> aiController = () -> !flying ? new GroundAI() : new FlyingAI();
|
||||
|
||||
@@ -37,6 +37,7 @@ public class MissileUnitType extends UnitType{
|
||||
fogRadius = 2f;
|
||||
loopSound = Sounds.missileTrail;
|
||||
loopSoundVolume = 0.05f;
|
||||
drawMinimap = false;
|
||||
//TODO weapon configs, etc?
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user