From 17b09fbd51118287739f67dc20c0a976b13eaf9e Mon Sep 17 00:00:00 2001 From: DeltaNedas Date: Sun, 8 Nov 2020 20:51:14 +0000 Subject: [PATCH] h --- core/src/mindustry/entities/comp/UnitComp.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/mindustry/entities/comp/UnitComp.java b/core/src/mindustry/entities/comp/UnitComp.java index 14fdf9c1bc..efd0491609 100644 --- a/core/src/mindustry/entities/comp/UnitComp.java +++ b/core/src/mindustry/entities/comp/UnitComp.java @@ -33,7 +33,7 @@ import static mindustry.Vars.*; abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, Itemsc, Rotc, Unitc, Weaponsc, Drawc, Boundedc, Syncc, Shieldc, Commanderc, Displayable, Senseable, Ranged{ @Import boolean hovering, dead; - @Import float x, y, rotation, elevation, maxHealth, drag, armor, hitSize, health, ammo; + @Import float x, y, rotation, elevation, maxHealth, drag, armor, hitSize, health, ammo, minFormationSpeed; @Import Team team; @Import int id; @@ -69,7 +69,7 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I public float speed(){ //limit speed to minimum formation speed to preserve formation - return isCommanding() ? ((Commanderc)this).minFormationSpeed * 0.98f : type.speed; + return isCommanding() ? minFormationSpeed * 0.98f : type.speed; } /** @return speed with boost multipliers factored in. */