Fixed #8513
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user