Added DMG_NO_ENHANCE for DamageMobj.

- Disables PowerDamage's effect, similar to DMG_NO_PROTECT disabling PowerProtect.
This commit is contained in:
Major Cooke 2018-11-10 09:00:49 -06:00 committed by Christoph Oelckers
parent 191f2d9d76
commit 9a7f570b19
3 changed files with 3 additions and 1 deletions

View file

@ -1086,7 +1086,7 @@ static int DamageMobj (AActor *target, AActor *inflictor, AActor *source, int da
damage = int(damage * source->DamageMultiply);
// Handle active damage modifiers (e.g. PowerDamage)
if (damage > 0)
if (damage > 0 && !(flags & DMG_NO_ENHANCE))
{
damage = source->GetModifiedDamage(mod, damage, false);
}

View file

@ -454,6 +454,7 @@ enum EDmgFlags
DMG_USEANGLE = 512,
DMG_NO_PAIN = 1024,
DMG_EXPLOSION = 2048,
DMG_NO_ENHANCE = 4096,
};

View file

@ -940,6 +940,7 @@ enum EDmgFlags
DMG_USEANGLE = 512,
DMG_NO_PAIN = 1024,
DMG_EXPLOSION = 2048,
DMG_NO_ENHANCE = 4096,
}
enum EReplace