diff --git a/core/src/mindustry/world/blocks/defense/turrets/LaserTurret.java b/core/src/mindustry/world/blocks/defense/turrets/LaserTurret.java index 66ed79aa8b..3abe53bcf3 100644 --- a/core/src/mindustry/world/blocks/defense/turrets/LaserTurret.java +++ b/core/src/mindustry/world/blocks/defense/turrets/LaserTurret.java @@ -59,7 +59,19 @@ public class LaserTurret extends PowerTurret{ if(bulletLife <= 0f){ bullet = null; } + }else if(reload > 0){ + Liquid liquid = liquids().current(); + float maxUsed = consumes.get(ConsumeType.liquid).amount; + + float used = (tile.isEnemyCheat() ? maxUsed * Time.delta() : Math.min(liquids.get(liquid), maxUsed * Time.delta())) * liquid.heatCapacity * coolantMultiplier; + reload -= used; + liquids.remove(liquid, used); + + if(Mathf.chance(0.06 * used)){ + coolEffect.at(x + Mathf.range(size * tilesize / 2f), y + Mathf.range(size * tilesize / 2f)); + } } + } @Override @@ -74,17 +86,6 @@ public class LaserTurret extends PowerTurret{ shoot(type); reload = reloadTime; - }else{ - Liquid liquid = liquids().current(); - float maxUsed = consumes.get(ConsumeType.liquid).amount; - - float used = (tile.isEnemyCheat() ? maxUsed * Time.delta() : Math.min(liquids.get(liquid), maxUsed * Time.delta())) * liquid.heatCapacity * coolantMultiplier; - reload -= used; - liquids.remove(liquid, used); - - if(Mathf.chance(0.06 * used)){ - coolEffect.at(x + Mathf.range(size * tilesize / 2f), y + Mathf.range(size * tilesize / 2f)); - } } }