- Fixed: 0 damage projectiles did not call P_DamageMobj.

SVN r1944 (trunk)
This commit is contained in:
Randy Heit 2009-10-28 23:25:27 +00:00
parent df317801bf
commit e5d6256c2d
2 changed files with 2 additions and 1 deletions

View file

@ -1,4 +1,5 @@
October 28, 2009 October 28, 2009
- Fixed: 0 damage projectiles did not call P_DamageMobj.
- Fixed: Do not exit P_DamageMobj early if damage is 0, so we can still get - Fixed: Do not exit P_DamageMobj early if damage is 0, so we can still get
the side effects from it. PainThreshold also needs to be inclusive, as the side effects from it. PainThreshold also needs to be inclusive, as
the docs already state. the docs already state.

View file

@ -1092,7 +1092,7 @@ bool PIT_CheckThing (AActor *thing, FCheckPosition &tm)
// Do damage // Do damage
damage = tm.thing->GetMissileDamage ((tm.thing->flags4 & MF4_STRIFEDAMAGE) ? 3 : 7, 1); damage = tm.thing->GetMissileDamage ((tm.thing->flags4 & MF4_STRIFEDAMAGE) ? 3 : 7, 1);
// [GZ] If MF6_FORCEPAIN is set, we need to call P_DamageMobj even if damage is 0! // [GZ] If MF6_FORCEPAIN is set, we need to call P_DamageMobj even if damage is 0!
if ((damage > 0) || (tm.thing->flags6 & MF6_FORCEPAIN)) if ((damage >= 0) || (tm.thing->flags6 & MF6_FORCEPAIN))
{ {
P_DamageMobj (thing, tm.thing, tm.thing->target, damage, tm.thing->DamageType); P_DamageMobj (thing, tm.thing, tm.thing->target, damage, tm.thing->DamageType);
if (damage > 0) if (damage > 0)