- fixed: Draining health from a victim must check for damage reduction before awarding the health to the player. This affected Heretic's gauntlets, A_Saw and A_CustomPunch.

- added a DONTDRAIN flag that prevents the above attacks from draining any health at all.
This commit is contained in:
Christoph Oelckers 2013-06-24 16:42:43 +02:00
commit 394f21f71e
8 changed files with 27 additions and 15 deletions

View file

@ -1262,7 +1262,7 @@ int P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage,
// If the damaging player has the power of drain, give the player 50% of the damage
// done in health.
if ( source && source->player && source->player->cheats & CF_DRAIN)
if ( source && source->player && source->player->cheats & CF_DRAIN && !(target->flags5 & MF5_DONTDRAIN))
{
if (!target->player || target->player != source->player)
{