From f9664892983f5fde3a9a97b05cdf711d2819ee76 Mon Sep 17 00:00:00 2001 From: Anuken Date: Wed, 25 Mar 2020 23:28:20 -0400 Subject: [PATCH] Various tweaks --- core/src/mindustry/ai/types/FlyingAI.java | 4 ++++ core/src/mindustry/entities/def/FlyingComp.java | 9 --------- core/src/mindustry/ui/dialogs/PlanetDialog.java | 2 +- core/src/mindustry/world/blocks/storage/LaunchPad.java | 2 +- 4 files changed, 6 insertions(+), 11 deletions(-) diff --git a/core/src/mindustry/ai/types/FlyingAI.java b/core/src/mindustry/ai/types/FlyingAI.java index e64443bf8d..b6b3a841de 100644 --- a/core/src/mindustry/ai/types/FlyingAI.java +++ b/core/src/mindustry/ai/types/FlyingAI.java @@ -14,6 +14,10 @@ public class FlyingAI extends AIController{ public void update(){ unit.rotation(unit.vel().angle()); + if(unit.isFlying()){ + unit.wobble(); + } + if(Units.invalidateTarget(target, unit.team(), unit.x(), unit.y())){ target = null; } diff --git a/core/src/mindustry/entities/def/FlyingComp.java b/core/src/mindustry/entities/def/FlyingComp.java index 022caf513d..4d87489e6a 100644 --- a/core/src/mindustry/entities/def/FlyingComp.java +++ b/core/src/mindustry/entities/def/FlyingComp.java @@ -40,11 +40,6 @@ abstract class FlyingComp implements Posc, Velc, Healthc, Hitboxc{ Vec2 t = Tmp.v3.set(vector).scl(floorSpeedMultiplier()); //target vector Tmp.v1.set(t).sub(vel).limit(acceleration * vector.len()); //delta vector vel.add(Tmp.v1); - - //float mag = Tmp.v3.len() * acceleration; - //vel.lerp(t, Tmp.v3.len() * acceleration); - //vel.x = Mathf.approach(vel.x, t.x, mag); - //vel.y = Mathf.approach(vel.y, t.y, mag); } float floorSpeedMultiplier(){ @@ -56,10 +51,6 @@ abstract class FlyingComp implements Posc, Velc, Healthc, Hitboxc{ public void update(){ Floor floor = floorOn(); - if(isFlying() && !net.client()){ - wobble(); - } - if(isGrounded() && floor.isLiquid){ if((splashTimer += Mathf.dst(deltaX(), deltaY())) >= 7f){ floor.walkEffect.at(x, y, 0, floor.mapColor); diff --git a/core/src/mindustry/ui/dialogs/PlanetDialog.java b/core/src/mindustry/ui/dialogs/PlanetDialog.java index cdfa75134b..74c3f024b7 100644 --- a/core/src/mindustry/ui/dialogs/PlanetDialog.java +++ b/core/src/mindustry/ui/dialogs/PlanetDialog.java @@ -218,7 +218,7 @@ public class PlanetDialog extends FloatingDialog{ } if(sec.hostility >= 0f){ - //drawSelection(sec, Color.scarlet, 0.1f * sec.hostility); + drawSelection(sec, Color.scarlet, 0.1f * sec.hostility); } } diff --git a/core/src/mindustry/world/blocks/storage/LaunchPad.java b/core/src/mindustry/world/blocks/storage/LaunchPad.java index 5987d8d172..6b577d4adc 100644 --- a/core/src/mindustry/world/blocks/storage/LaunchPad.java +++ b/core/src/mindustry/world/blocks/storage/LaunchPad.java @@ -62,7 +62,7 @@ public class LaunchPad extends StorageBlock{ @Override public boolean acceptItem(Tilec source, Item item){ - return item.type == ItemType.material && items.total() < itemCapacity; + return item.type == ItemType.material && super.acceptItem(source, item); } @Override