diff --git a/core/src/mindustry/content/Fx.java b/core/src/mindustry/content/Fx.java index 2b5fd4220b..e0404c53cc 100644 --- a/core/src/mindustry/content/Fx.java +++ b/core/src/mindustry/content/Fx.java @@ -159,7 +159,7 @@ public class Fx{ commandSend = new Effect(28, e -> { color(Pal.command); stroke(e.fout() * 2f); - Lines.circle(e.x, e.y, 4f + e.finpow() * 120f); + Lines.circle(e.x, e.y, 4f + e.finpow() * e.rotation); }), upgradeCore = new Effect(120f, e -> { diff --git a/core/src/mindustry/entities/comp/CommanderComp.java b/core/src/mindustry/entities/comp/CommanderComp.java index 92a86e12c2..a3f0a0c625 100644 --- a/core/src/mindustry/entities/comp/CommanderComp.java +++ b/core/src/mindustry/entities/comp/CommanderComp.java @@ -64,7 +64,7 @@ abstract class CommanderComp implements Entityc, Posc{ units.clear(); - Units.nearby(team, x, y, 150f, u -> { + Units.nearby(team, x, y, type.commandRadius, u -> { if(u.isAI() && include.get(u) && u != self() && u.type.flying == type.flying && u.hitSize <= hitSize * 1.1f){ units.add(u); } diff --git a/core/src/mindustry/input/InputHandler.java b/core/src/mindustry/input/InputHandler.java index 4fbc73f627..874ade09e7 100644 --- a/core/src/mindustry/input/InputHandler.java +++ b/core/src/mindustry/input/InputHandler.java @@ -388,11 +388,11 @@ public abstract class InputHandler implements InputProcessor, GestureListener{ if(commander.isCommanding()){ commander.clearCommand(); - }else if(player.unit().type.commandLimit > 0){ + }else if(player.unit().type.commandLimit > 0 && player.unit().type.commandRadius > 0){ //TODO try out some other formations commander.commandNearby(new CircleFormation()); - Fx.commandSend.at(player); + Fx.commandSend.at(player, player.unit().type.commandRadius); } } diff --git a/core/src/mindustry/type/UnitType.java b/core/src/mindustry/type/UnitType.java index f3a511b539..189cba007c 100644 --- a/core/src/mindustry/type/UnitType.java +++ b/core/src/mindustry/type/UnitType.java @@ -55,6 +55,7 @@ public class UnitType extends UnlockableContent{ public float aimDst = -1f; public float buildBeamOffset = 3.8f; public int commandLimit = 8; + public float commandRadius = 150f; public float visualElevation = -1f; public boolean allowLegStep = false; public boolean hovering = false; diff --git a/core/src/mindustry/world/blocks/units/CommandCenter.java b/core/src/mindustry/world/blocks/units/CommandCenter.java index 19a721832b..11cf6377ad 100644 --- a/core/src/mindustry/world/blocks/units/CommandCenter.java +++ b/core/src/mindustry/world/blocks/units/CommandCenter.java @@ -23,6 +23,7 @@ public class CommandCenter extends Block{ public TextureRegionDrawable[] commandRegions = new TextureRegionDrawable[UnitCommand.all.length]; public Color topColor = null, bottomColor = Color.valueOf("5e5e5e"); public Effect effect = Fx.commandSend; + public float effectSize = 150f; public CommandCenter(String name){ super(name); @@ -35,7 +36,7 @@ public class CommandCenter extends Block{ config(UnitCommand.class, (CommandBuild build, UnitCommand command) -> { build.team.data().command = command; - effect.at(build); + effect.at(build, effectSize); Events.fire(new CommandIssueEvent(build, command)); }); }