mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 23:01:59 +00:00
- fixed armor bonus giving in A_CustomPunch
This commit is contained in:
parent
5a054da4d9
commit
f6ce5f59ae
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