- Added DavidPH's Poison damage extension but changed it so that the metadata can be removed.

SVN r2450 (trunk)
This commit is contained in:
Christoph Oelckers 2010-07-23 21:36:17 +00:00
commit f430881a54
7 changed files with 106 additions and 7 deletions

View file

@ -1369,6 +1369,34 @@ dopain:
target->flags |= MF_JUSTHIT; // fight back!
}
void P_PoisonMobj (AActor *target, AActor *inflictor, AActor *source, int damage, int duration, int period)
{
int olddamage = target->PoisonDamageReceived;
int oldduration = target->PoisonDurationReceived;
target->Poisoner = source;
if (inflictor->flags6 & MF6_ADDITIVEPOISONDAMAGE)
{
target->PoisonDamageReceived += damage;
}
else
{
target->PoisonDamageReceived = damage;
}
if (inflictor->flags6 & MF6_ADDITIVEPOISONDURATION)
{
target->PoisonDurationReceived += duration;
}
else
{
target->PoisonDurationReceived = duration;
}
target->PoisonPeriodReceived = period;
}
bool AActor::OkayToSwitchTarget (AActor *other)
{
if (other == this)