From efa8d8a0d76380a085d597eb9da4835f7fe56cf4 Mon Sep 17 00:00:00 2001 From: Anuken Date: Thu, 2 Jul 2020 23:19:44 -0400 Subject: [PATCH] Minor weapon fixes --- core/src/mindustry/content/UnitTypes.java | 34 ++----------------- .../mindustry/entities/comp/WeaponsComp.java | 1 + 2 files changed, 4 insertions(+), 31 deletions(-) diff --git a/core/src/mindustry/content/UnitTypes.java b/core/src/mindustry/content/UnitTypes.java index e448b6e64b..8cedc29a5b 100644 --- a/core/src/mindustry/content/UnitTypes.java +++ b/core/src/mindustry/content/UnitTypes.java @@ -103,44 +103,16 @@ public class UnitTypes implements ContentList{ buildSpeed = 0.8f; weapons.add(new Weapon("heal-weapon"){{ - shootY = 1.5f; + shootY = 2f; reload = 24f; - x = 3.5f; + x = 4.5f; alternate = false; ejectEffect = Fx.none; recoil = 2f; bullet = Bullets.healBullet; shootSound = Sounds.pew; }}); - } - - /* - - float healRange = 60f; - float healAmount = 10f; - float healReload = 160f; - boolean wasHealed; - - @Override - public void update(Unitc player){ - - if(player.timer().get(Player.timerAbility, healReload)){ - wasHealed = false; - - Units.nearby(player.team(), player.x, player.y, healRange, unit -> { - if(unit.health < unit.maxHealth()){ - Fx.heal.at(unit); - wasHealed = true; - } - unit.heal(healAmount); - }); - - if(wasHealed){ - Fx.healWave.at(player); - } - } - }*/ - }; + }}; oculon = new UnitType("oculon"){{ drillTier = 1; diff --git a/core/src/mindustry/entities/comp/WeaponsComp.java b/core/src/mindustry/entities/comp/WeaponsComp.java index 664d8dd350..9659469281 100644 --- a/core/src/mindustry/entities/comp/WeaponsComp.java +++ b/core/src/mindustry/entities/comp/WeaponsComp.java @@ -84,6 +84,7 @@ abstract class WeaponsComp implements Teamc, Posc, Rotc{ Weapon weapon = mount.weapon; mount.reload = Math.max(mount.reload - Time.delta(), 0); + //flip weapon shoot side for alternating weapons at half reload if(weapon.otherSide != -1 && weapon.alternate && mount.side == weapon.flipSprite && mount.reload + Time.delta() > weapon.reload/2f && mount.reload <= weapon.reload/2f){ mounts[weapon.otherSide].side = !mounts[weapon.otherSide].side;