- fixed incorrect check for negative damage in APowerProtection::ModifyDamage.

This commit is contained in:
Christoph Oelckers 2016-04-09 21:57:35 +02:00
parent bcebeadedc
commit 1f1a0ca847

View file

@ -1704,7 +1704,7 @@ void APowerProtection::ModifyDamage(int damage, FName damageType, int &newdamage
DmgFactors *df = GetClass()->DamageFactors; DmgFactors *df = GetClass()->DamageFactors;
if (df != NULL && df->CountUsed() != 0) if (df != NULL && df->CountUsed() != 0)
{ {
newdam = MIN(0, df->Apply(damageType, damage)); newdam = MAX(0, df->Apply(damageType, damage));
} }
else else
{ {