diff --git a/core/assets/sprites/block_colors.png b/core/assets/sprites/block_colors.png index 948cb3e92e..a9a752713f 100644 Binary files a/core/assets/sprites/block_colors.png and b/core/assets/sprites/block_colors.png differ diff --git a/core/assets/sprites/sprites.png b/core/assets/sprites/sprites.png index 9492724c15..b3e8002045 100644 Binary files a/core/assets/sprites/sprites.png and b/core/assets/sprites/sprites.png differ diff --git a/core/assets/sprites/sprites2.png b/core/assets/sprites/sprites2.png index 3f449e1846..edca806e40 100644 Binary files a/core/assets/sprites/sprites2.png and b/core/assets/sprites/sprites2.png differ diff --git a/core/assets/sprites/sprites_fallback2.png b/core/assets/sprites/sprites_fallback2.png index 220994fc71..ddca19eac1 100644 Binary files a/core/assets/sprites/sprites_fallback2.png and b/core/assets/sprites/sprites_fallback2.png differ diff --git a/core/assets/sprites/sprites_fallback3.png b/core/assets/sprites/sprites_fallback3.png index b0814b6c10..e63af937bd 100644 Binary files a/core/assets/sprites/sprites_fallback3.png and b/core/assets/sprites/sprites_fallback3.png differ diff --git a/core/assets/sprites/sprites_fallback4.png b/core/assets/sprites/sprites_fallback4.png index bc4468e2f0..c4a0bb6adb 100644 Binary files a/core/assets/sprites/sprites_fallback4.png and b/core/assets/sprites/sprites_fallback4.png differ diff --git a/core/assets/sprites/sprites_fallback5.png b/core/assets/sprites/sprites_fallback5.png index fe51d8cac2..eb02ba02ea 100644 Binary files a/core/assets/sprites/sprites_fallback5.png and b/core/assets/sprites/sprites_fallback5.png differ diff --git a/core/src/io/anuke/mindustry/entities/type/Player.java b/core/src/io/anuke/mindustry/entities/type/Player.java index 3f1cf60d6d..c8a6550da7 100644 --- a/core/src/io/anuke/mindustry/entities/type/Player.java +++ b/core/src/io/anuke/mindustry/entities/type/Player.java @@ -669,7 +669,7 @@ public class Player extends Unit implements BuilderMinerTrait, ShooterTrait{ } if(dst(moveTarget) <= 2f * Time.delta()){ - if(tapping){ + if(tapping && !isDead()){ Tile tile = ((TileEntity)moveTarget).tile; tile.block().tapped(tile, this); } diff --git a/core/src/io/anuke/mindustry/ui/fragments/HudFragment.java b/core/src/io/anuke/mindustry/ui/fragments/HudFragment.java index fe8672b53b..0b3a8b8302 100644 --- a/core/src/io/anuke/mindustry/ui/fragments/HudFragment.java +++ b/core/src/io/anuke/mindustry/ui/fragments/HudFragment.java @@ -51,6 +51,7 @@ public class HudFragment extends Fragment{ private float coreAttackTime; private float lastCoreHP; + private Team lastTeam; private float coreAttackOpacity = 0f; public void build(Group parent){ @@ -314,13 +315,19 @@ public class HudFragment extends Fragment{ }); t.top().visible(() -> { - if(state.is(State.menu) || state.teams.get(player.getTeam()).cores.size == 0 || - state.teams.get(player.getTeam()).cores.first().entity == null){ + if(state.is(State.menu) || state.teams.get(player.getTeam()).cores.size == 0 || state.teams.get(player.getTeam()).cores.first().entity == null){ coreAttackTime = 0f; return false; } float curr = state.teams.get(player.getTeam()).cores.first().entity.health; + + if(lastTeam != player.getTeam()){ + lastCoreHP = curr; + lastTeam = player.getTeam(); + return false; + } + if(!Float.isNaN(lastCoreHP) && curr < lastCoreHP){ coreAttackTime = notifDuration; } @@ -334,6 +341,7 @@ public class HudFragment extends Fragment{ } coreAttackTime -= Time.delta(); + lastTeam = player.getTeam(); return coreAttackOpacity > 0; }); @@ -538,6 +546,7 @@ public class HudFragment extends Fragment{ } shown = !shown; + flip.getParent().act(Core.graphics.getDeltaTime()); } private void addWaveTable(TextButton table){ diff --git a/core/src/io/anuke/mindustry/world/blocks/defense/turrets/Turret.java b/core/src/io/anuke/mindustry/world/blocks/defense/turrets/Turret.java index 52d0cba905..77ec838ba6 100644 --- a/core/src/io/anuke/mindustry/world/blocks/defense/turrets/Turret.java +++ b/core/src/io/anuke/mindustry/world/blocks/defense/turrets/Turret.java @@ -193,7 +193,11 @@ public abstract class Turret extends Block{ protected void findTarget(Tile tile){ TurretEntity entity = tile.entity(); - entity.target = Units.closestTarget(tile.getTeam(), tile.drawx(), tile.drawy(), range, e -> !e.isDead() && (!e.isFlying() || targetAir) && (e.isFlying() || targetGround)); + if(targetAir && !targetGround){ + entity.target = Units.closestEnemy(tile.getTeam(), tile.drawx(), tile.drawy(), range, e -> !e.isDead() && e.isFlying()); + }else{ + entity.target = Units.closestTarget(tile.getTeam(), tile.drawx(), tile.drawy(), range, e -> !e.isDead() && (!e.isFlying() || targetAir) && (e.isFlying() || targetGround)); + } } protected void turnToTarget(Tile tile, float targetRot){ diff --git a/core/src/io/anuke/mindustry/world/blocks/power/PowerGraph.java b/core/src/io/anuke/mindustry/world/blocks/power/PowerGraph.java index 86ad517048..9016bfac92 100644 --- a/core/src/io/anuke/mindustry/world/blocks/power/PowerGraph.java +++ b/core/src/io/anuke/mindustry/world/blocks/power/PowerGraph.java @@ -187,11 +187,6 @@ public class PowerGraph{ } public void add(Tile tile){ - if(tile.block().consumes.hasPower() && !tile.block().consumes.getPower().buffered){ - //reset satisfaction to zero in case of direct consumer. There is no reason to clear power from buffered consumers. - tile.entity.power.satisfaction = 0.0f; - } - tile.entity.power.graph = this; all.add(tile);