Fixed #4071
This commit is contained in:
@@ -51,11 +51,7 @@ abstract class HealthComp implements Entityc, Posc{
|
||||
|
||||
/** Damage and pierce armor. */
|
||||
void damagePierce(float amount, boolean withEffect){
|
||||
if(this instanceof Shieldc c){
|
||||
damage(amount + c.armor(), withEffect);
|
||||
}else{
|
||||
damage(amount, withEffect);
|
||||
}
|
||||
damage(amount, withEffect);
|
||||
}
|
||||
|
||||
/** Damage and pierce armor. */
|
||||
|
||||
@@ -26,8 +26,22 @@ abstract class ShieldComp implements Healthc, Posc{
|
||||
amount = Math.max(amount - armor, minArmorDamage * amount);
|
||||
amount /= healthMultiplier;
|
||||
|
||||
hitTime = 1f;
|
||||
rawDamage(amount);
|
||||
}
|
||||
|
||||
@Replace
|
||||
@Override
|
||||
public void damagePierce(float amount, boolean withEffect){
|
||||
float pre = hitTime;
|
||||
|
||||
rawDamage(amount);
|
||||
|
||||
if(!withEffect){
|
||||
hitTime = pre;
|
||||
}
|
||||
}
|
||||
|
||||
private void rawDamage(float amount){
|
||||
boolean hadShields = shield > 0.0001f;
|
||||
|
||||
if(hadShields){
|
||||
|
||||
Reference in New Issue
Block a user