From bb42d58427b2242db9a5992d2323f6808c8871c5 Mon Sep 17 00:00:00 2001 From: Chronos Ouroboros Date: Mon, 10 Feb 2020 15:38:12 -0300 Subject: [PATCH] Revert "Added support for standard DamageFactor property on Armor, PowerProtection and PowerDamage items." This reverts commit e781cb40430240e2b4641274e45a0245a21a4c43. --- wadsrc/static/zscript/actors/inventory/armor.zs | 3 +-- wadsrc/static/zscript/actors/inventory/powerups.zs | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/wadsrc/static/zscript/actors/inventory/armor.zs b/wadsrc/static/zscript/actors/inventory/armor.zs index 11e2932056..bc764fc2c5 100644 --- a/wadsrc/static/zscript/actors/inventory/armor.zs +++ b/wadsrc/static/zscript/actors/inventory/armor.zs @@ -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); } } } diff --git a/wadsrc/static/zscript/actors/inventory/powerups.zs b/wadsrc/static/zscript/actors/inventory/powerups.zs index f07dd13d49..ede8f7aa7a 100644 --- a/wadsrc/static/zscript/actors/inventory/powerups.zs +++ b/wadsrc/static/zscript/actors/inventory/powerups.zs @@ -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); } } @@ -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); } }