diff --git a/src/g_hexen/a_flechette.cpp b/src/g_hexen/a_flechette.cpp index 11352a41d2..7cdcca96d7 100644 --- a/src/g_hexen/a_flechette.cpp +++ b/src/g_hexen/a_flechette.cpp @@ -343,6 +343,11 @@ int APoisonCloud::DoSpecialDamage (AActor *victim, int damage, FName damagetype) { damage = (int)((float)damage * level.teamdamage); } + // Handle passive damage modifiers (e.g. PowerProtection) + if (victim->Inventory != NULL) + { + victim->Inventory->ModifyDamage(damage, damagetype, damage, true); + } // Modify with damage factors damage = FixedMul(damage, victim->DamageFactor); if (damage > 0) diff --git a/src/p_interaction.cpp b/src/p_interaction.cpp index b22c60bc1f..70009f4ee3 100644 --- a/src/p_interaction.cpp +++ b/src/p_interaction.cpp @@ -1566,18 +1566,20 @@ void P_PoisonDamage (player_t *player, AActor *source, int damage, // Take half damage in trainer mode damage = FixedMul(damage, G_SkillProperty(SKILLP_DamageFactor)); } + // Handle passive damage modifiers (e.g. PowerProtection) + if (target->Inventory != NULL) + { + target->Inventory->ModifyDamage(damage, player->poisontype, damage, true); + } // Modify with damage factors + damage = FixedMul(damage, target->DamageFactor); if (damage > 0) { - damage = FixedMul(damage, target->DamageFactor); - if (damage > 0) - { - damage = DamageTypeDefinition::ApplyMobjDamageFactor(damage, player->poisontype, target->GetClass()->ActorInfo->DamageFactors); - } - if (damage <= 0) - { // Damage was reduced to 0, so don't bother further. - return; - } + damage = DamageTypeDefinition::ApplyMobjDamageFactor(damage, player->poisontype, target->GetClass()->ActorInfo->DamageFactors); + } + if (damage <= 0) + { // Damage was reduced to 0, so don't bother further. + return; } if (damage >= player->health && (G_SkillProperty(SKILLP_AutoUseHealth) || deathmatch)