Skip to content

Commit

Permalink
Revert "Added support for standard DamageFactor property on Armor, Po…
Browse files Browse the repository at this point in the history
…werProtection and PowerDamage items."

This reverts commit e781cb4.
  • Loading branch information
Doom2fan committed Feb 10, 2020
1 parent e781cb4 commit bb42d58
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions wadsrc/static/zscript/actors/inventory/armor.zs
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,7 @@ class BasicArmor : Armor
// Once the armor has absorbed its part of the damage, then apply its damage factor, if any, to the player
if ((damage > 0) && (ArmorType != 'None')) // BasicArmor is not going to have any damage factor, so skip it.
{
damage = int(damage * DamageFactor);
newdamage = (damage < 1) ? 0 : ApplyDamageFactors(ArmorType, damageType, damage, damage);
newdamage = ApplyDamageFactors(ArmorType, damageType, damage, damage);
}
}
}
Expand Down
6 changes: 2 additions & 4 deletions wadsrc/static/zscript/actors/inventory/powerups.zs
Original file line number Diff line number Diff line change
Expand Up @@ -1659,8 +1659,7 @@ class PowerDamage : Powerup
{
if (!passive && damage > 0)
{
damage = int(damage * DamageFactor);
newdamage = (damage < 1) ? 0 : max(1, ApplyDamageFactors(GetClass(), damageType, damage, damage * 4));
newdamage = max(1, ApplyDamageFactors(GetClass(), damageType, damage, damage * 4));
if (Owner != null && newdamage > damage) Owner.A_StartSound(ActiveSound, CHAN_AUTO, CHANF_DEFAULT, 1.0, ATTN_NONE);
}
}
Expand Down Expand Up @@ -1754,8 +1753,7 @@ class PowerProtection : Powerup
{
if (passive && damage > 0)
{
damage = int(damage * DamageFactor);
newdamage = (damage < 1) ? 0 : max(0, ApplyDamageFactors(GetClass(), damageType, damage, damage / 4));
newdamage = max(0, ApplyDamageFactors(GetClass(), damageType, damage, damage / 4));
if (Owner != null && newdamage < damage) Owner.A_StartSound(ActiveSound, CHAN_AUTO, CHANF_DEFAULT, 1.0, ATTN_NONE);
}
}
Expand Down

0 comments on commit bb42d58

Please sign in to comment.