- Added Gez's patch for removing MF4_FIRERESIST.

SVN r1177 (trunk)
This commit is contained in:
Christoph Oelckers 2008-08-19 19:38:39 +00:00
commit 30685c3a74
9 changed files with 20 additions and 23 deletions

View file

@ -951,23 +951,14 @@ void P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage
if (olddam != damage && damage <= 0) return;
}
// to be removed and replaced by an actual damage factor
// once the actors using it are converted to DECORATE.
if (mod == NAME_Fire && target->flags4 & MF4_FIRERESIST)
DmgFactors * df = target->GetClass()->ActorInfo->DamageFactors;
if (df != NULL)
{
damage /= 2;
}
else
{
DmgFactors * df = target->GetClass()->ActorInfo->DamageFactors;
if (df != NULL)
fixed_t * pdf = df->CheckKey(mod);
if (pdf != NULL)
{
fixed_t * pdf = df->CheckKey(mod);
if (pdf != NULL)
{
damage = FixedMul(damage, *pdf);
if (damage <= 0) return;
}
damage = FixedMul(damage, *pdf);
if (damage <= 0) return;
}
}