- added FDARI's Default/global damagetype properties submission.
SVN r3523 (trunk)
This commit is contained in:
parent
b044c134d3
commit
81eef71067
5 changed files with 161 additions and 14 deletions
|
|
@ -997,20 +997,12 @@ void P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage
|
|||
|
||||
if (!(flags & DMG_NO_FACTOR))
|
||||
{
|
||||
DmgFactors *df = target->GetClass()->ActorInfo->DamageFactors;
|
||||
if (df != NULL)
|
||||
{
|
||||
fixed_t *pdf = df->CheckFactor(mod);
|
||||
if (pdf != NULL)
|
||||
{
|
||||
damage = FixedMul(damage, *pdf);
|
||||
if (damage <= 0)
|
||||
return;
|
||||
}
|
||||
}
|
||||
damage = FixedMul(damage, target->DamageFactor);
|
||||
if (damage < 0)
|
||||
return;
|
||||
damage = DamageTypeDefinition::ApplyMobjDamageFactor(damage, mod, target->GetClass()->ActorInfo->DamageFactors);
|
||||
if (damage <= 0)
|
||||
return;
|
||||
}
|
||||
|
||||
damage = target->TakeSpecialDamage (inflictor, source, damage, mod);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue