- added DavidPH's PoisonDamageType submission.

SVN r3235 (trunk)
This commit is contained in:
Christoph Oelckers 2011-06-13 10:39:14 +00:00
commit 44921297d3
6 changed files with 27 additions and 13 deletions

View file

@ -1368,11 +1368,8 @@ dopain:
target->flags |= MF_JUSTHIT; // fight back!
}
void P_PoisonMobj (AActor *target, AActor *inflictor, AActor *source, int damage, int duration, int period)
void P_PoisonMobj (AActor *target, AActor *inflictor, AActor *source, int damage, int duration, int period, FName type)
{
int olddamage = target->PoisonDamageReceived;
int oldduration = target->PoisonDurationReceived;
// Check for invulnerability.
if (!(inflictor->flags6 & MF6_POISONALWAYS))
{
@ -1393,6 +1390,8 @@ void P_PoisonMobj (AActor *target, AActor *inflictor, AActor *source, int damage
}
target->Poisoner = source;
target->PoisonDamageTypeReceived = type;
target->PoisonPeriodReceived = period;
if (inflictor->flags6 & MF6_ADDITIVEPOISONDAMAGE)
{
@ -1412,7 +1411,6 @@ void P_PoisonMobj (AActor *target, AActor *inflictor, AActor *source, int damage
target->PoisonDurationReceived = duration;
}
target->PoisonPeriodReceived = period;
}
bool AActor::OkayToSwitchTarget (AActor *other)