- Added DavidPH's Poison damage extension but changed it so that the metadata can be removed.
SVN r2450 (trunk)
This commit is contained in:
parent
545a892faa
commit
f430881a54
7 changed files with 106 additions and 7 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue