- fixed armor bonus giving in A_CustomPunch

This commit is contained in:
Christoph Oelckers 2019-01-22 00:36:15 +01:00
parent 5a054da4d9
commit f6ce5f59ae

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 ();
}
}
}
}