mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-12-11 13:11:48 +00:00
- fixed armor bonus giving in A_CustomPunch
This commit is contained in:
parent
7588241b1b
commit
f55d28b602
1 changed files with 11 additions and 8 deletions
|
@ -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 ();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue