- P_DamageMobj() now returns the amount of damage actually done so that the bleed functions

can perform based on the amount of damage actually taken after all modifications are done to
  it. However, if the damage is canceled away, blood will still spawn for the original damage
  amount rather than the modified amount.

SVN r4012 (trunk)
This commit is contained in:
Randy Heit 2013-01-02 04:39:59 +00:00
commit 549712e719
26 changed files with 148 additions and 136 deletions

View file

@ -2806,8 +2806,8 @@ bool AActor::Slam (AActor *thing)
if (!(flags2 & MF2_DORMANT))
{
int dam = GetMissileDamage (7, 1);
P_DamageMobj (thing, this, this, dam, NAME_Melee);
P_TraceBleed (dam, thing, this);
int newdam = P_DamageMobj (thing, this, this, dam, NAME_Melee);
P_TraceBleed (newdam > 0 ? newdam : dam, thing, this);
// The charging monster may have died by the target's actions here.
if (health > 0)
{