diff --git a/core/src/mindustry/world/blocks/defense/turrets/Turret.java b/core/src/mindustry/world/blocks/defense/turrets/Turret.java index eb76c70604..240083ec93 100644 --- a/core/src/mindustry/world/blocks/defense/turrets/Turret.java +++ b/core/src/mindustry/world/blocks/defense/turrets/Turret.java @@ -395,7 +395,7 @@ public class Turret extends ReloadTurret{ for(int i = 0; i < chargeEffects; i++){ Time.run(Mathf.random(chargeMaxDelay), () -> { - if(!isValid()) return; + if(dead) return; tr.trns(rotation, shootLength); chargeEffect.at(x + tr.x, y + tr.y, rotation); }); @@ -404,7 +404,7 @@ public class Turret extends ReloadTurret{ charging = true; Time.run(chargeTime, () -> { - if(!isValid()) return; + if(dead) return; tr.trns(rotation, shootLength); recoil = recoilAmount; heat = 1f; @@ -418,7 +418,7 @@ public class Turret extends ReloadTurret{ for(int i = 0; i < shots; i++){ int ii = i; Time.run(burstSpacing * i, () -> { - if(!isValid() || !hasAmmo()) return; + if(dead || !hasAmmo()) return; recoil = recoilAmount; @@ -478,7 +478,7 @@ public class Turret extends ReloadTurret{ } protected void ejectEffects(){ - if(!isValid()) return; + if(dead) return; //alternate sides when using a double turret float scl = (shots == 2 && alternate && shotCounter % 2 == 1 ? -1f : 1f);