- Added DMSS_NOPROTECT.

Bypasses PowerProtection inventory items.
This commit is contained in:
MajorCooke 2014-10-27 22:29:10 -05:00
commit c01d1a8003
4 changed files with 10 additions and 5 deletions

View file

@ -1053,8 +1053,8 @@ int P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage,
return -1;
}
}
// Handle passive damage modifiers (e.g. PowerProtection)
if (target->Inventory != NULL)
// Handle passive damage modifiers (e.g. PowerProtection), provided they are not afflicted with protection penetrating powers.
if ((target->Inventory != NULL) && !(flags & DMG_NO_PROTECT))
{
int olddam = damage;
target->Inventory->ModifyDamage(olddam, mod, damage, true);
@ -1592,7 +1592,7 @@ bool AActor::OkayToSwitchTarget (AActor *other)
bool P_PoisonPlayer (player_t *player, AActor *poisoner, AActor *source, int poison)
{
if((player->cheats&CF_GODMODE) || (player->mo->flags2 & MF2_INVULNERABLE))
if((player->cheats&CF_GODMODE) || (player->mo->flags2 & MF2_INVULNERABLE) || (player->cheats & CF_GODMODE2))
{
return false;
}
@ -1643,8 +1643,8 @@ void P_PoisonDamage (player_t *player, AActor *source, int damage,
{
return;
}
if (damage < TELEFRAG_DAMAGE && ((target->flags2 & MF2_INVULNERABLE) ||
(player->cheats & CF_GODMODE)))
if ((damage < TELEFRAG_DAMAGE && ((target->flags2 & MF2_INVULNERABLE) ||
(player->cheats & CF_GODMODE))) || (player->cheats & CF_GODMODE2))
{ // target is invulnerable
return;
}