- added DavifPH's fix for poisoning invulnerable players.
SVN r3231 (trunk)
This commit is contained in:
parent
5d65ab6e6c
commit
ab60afd0b8
3 changed files with 21 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue