- added DavifPH's fix for poisoning invulnerable players.

SVN r3231 (trunk)
This commit is contained in:
Christoph Oelckers 2011-06-13 10:25:03 +00:00
commit ab60afd0b8
3 changed files with 21 additions and 0 deletions

View file

@ -1373,6 +1373,25 @@ void P_PoisonMobj (AActor *target, AActor *inflictor, AActor *source, int damage
int olddamage = target->PoisonDamageReceived;
int oldduration = target->PoisonDurationReceived;
// Check for invulnerability.
if (!(inflictor->flags6 & MF6_POISONALWAYS))
{
if (target->flags2 & MF2_INVULNERABLE)
{ // actor is invulnerable
if (target->player == NULL)
{
if (!(inflictor->flags3 & MF3_FOILINVUL))
{
return;
}
}
else
{
return;
}
}
}
target->Poisoner = source;
if (inflictor->flags6 & MF6_ADDITIVEPOISONDAMAGE)