Pass the target as the source for active damage modifiers (i.e. PowerDamage) instead of the actual source.

- Getting the victim would be impossible otherwise, and passing in the original source is redundant when there's already the owner.
This commit is contained in:
Major Cooke 2019-02-12 10:00:28 -06:00 committed by Christoph Oelckers
parent 3864ed78e0
commit 32e65ff11d

View file

@ -1143,7 +1143,7 @@ static int DamageMobj (AActor *target, AActor *inflictor, AActor *source, int da
// Handle active damage modifiers (e.g. PowerDamage) // Handle active damage modifiers (e.g. PowerDamage)
if (damage > 0 && !(flags & DMG_NO_ENHANCE)) if (damage > 0 && !(flags & DMG_NO_ENHANCE))
{ {
damage = source->GetModifiedDamage(mod, damage, false, inflictor, source, flags); damage = source->GetModifiedDamage(mod, damage, false, inflictor, target, flags);
} }
} }
// Handle passive damage modifiers (e.g. PowerProtection), provided they are not afflicted with protection penetrating powers. // Handle passive damage modifiers (e.g. PowerProtection), provided they are not afflicted with protection penetrating powers.