diff --git a/core/src/mindustry/entities/bullet/BulletType.java b/core/src/mindustry/entities/bullet/BulletType.java index e749c99058..2e98d4e539 100644 --- a/core/src/mindustry/entities/bullet/BulletType.java +++ b/core/src/mindustry/entities/bullet/BulletType.java @@ -394,9 +394,9 @@ public class BulletType extends Content implements Cloneable{ } public void handlePierce(Bullet b, float initialHealth, float x, float y){ - float sub = Math.max(initialHealth*pierceDamageFactor, 0); + float sub = Mathf.zero(pierceDamageFactor) ? 0f : Math.max(initialHealth * pierceDamageFactor, 0); //subtract health from each consecutive pierce - b.damage -= Math.min(b.damage, sub); + b.damage -= Float.isNaN(sub) ? b.damage : Math.min(b.damage, sub); if(removeAfterPierce && b.damage <= 0){ b.hit = true;