- fixed armor bonus giving in A_CustomPunch

This commit is contained in:
Christoph Oelckers 2019-01-22 00:36:15 +01:00
parent 7588241b1b
commit f55d28b602

View file

@ -297,15 +297,18 @@ class StateProvider : Inventory
}
if (armorbonustype != NULL)
{
let armorbonus = ArmorBonus(Spawn(armorbonustype));
armorbonus.SaveAmount *= int(actualdamage * lifesteal);
if (lifestealmax > 0) armorbonus.MaxSaveAmount = lifestealmax;
armorbonus.bDropped = true;
armorbonus.ClearCounters();
if (!armorbonus.CallTryPickup(self))
let armorbonus = BasicArmorBonus(Spawn(armorbonustype));
if (armorbonus)
{
armorbonus.Destroy ();
armorbonus.SaveAmount *= int(actualdamage * lifesteal);
if (lifestealmax > 0) armorbonus.MaxSaveAmount = lifestealmax;
armorbonus.bDropped = true;
armorbonus.ClearCounters();
if (!armorbonus.CallTryPickup(self))
{
armorbonus.Destroy ();
}
}
}
}