- Make APoisonCloud::DoSpecialDamage() and P_PoisonDamage() respect damage factors.
- Pass the damage type to AActor::DoSpecialDamage(). SVN r3717 (trunk)
This commit is contained in:
parent
4a3438499e
commit
e1641da881
16 changed files with 61 additions and 42 deletions
|
|
@ -991,7 +991,7 @@ void P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage
|
|||
}
|
||||
}
|
||||
|
||||
damage = inflictor->DoSpecialDamage (target, damage);
|
||||
damage = inflictor->DoSpecialDamage (target, damage, mod);
|
||||
if (damage == -1)
|
||||
{
|
||||
return;
|
||||
|
|
@ -1566,6 +1566,19 @@ void P_PoisonDamage (player_t *player, AActor *source, int damage,
|
|||
// Take half damage in trainer mode
|
||||
damage = FixedMul(damage, G_SkillProperty(SKILLP_DamageFactor));
|
||||
}
|
||||
// Modify with damage factors
|
||||
if (damage > 0)
|
||||
{
|
||||
damage = FixedMul(damage, target->DamageFactor);
|
||||
if (damage > 0)
|
||||
{
|
||||
damage = DamageTypeDefinition::ApplyMobjDamageFactor(damage, player->poisontype, target->GetClass()->ActorInfo->DamageFactors);
|
||||
}
|
||||
if (damage <= 0)
|
||||
{ // Damage was reduced to 0, so don't bother further.
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (damage >= player->health
|
||||
&& (G_SkillProperty(SKILLP_AutoUseHealth) || deathmatch)
|
||||
&& !player->morphTics)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue