mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-15 17:11:24 +00:00
- moved GetSaveAmount() from the base armor class
This commit is contained in:
parent
80c561a056
commit
b9a9e3f8b7
1 changed files with 9 additions and 17 deletions
|
@ -40,23 +40,6 @@ class Armor : Inventory
|
|||
Inventory.PickupSound "misc/armor_pkup";
|
||||
+INVENTORY.ISARMOR
|
||||
}
|
||||
|
||||
int GetSaveAmount ()
|
||||
{
|
||||
if (self is 'BasicArmorBonus')
|
||||
{
|
||||
let armor = BasicArmorBonus(self);
|
||||
return !armor.bIgnoreSkill ? int(armor.SaveAmount * G_SkillPropertyFloat(SKILLP_ArmorFactor)) : armor.SaveAmount;
|
||||
}
|
||||
|
||||
if (self is 'BasicArmorPickup')
|
||||
{
|
||||
let armor = BasicArmorPickup(self);
|
||||
return !armor.bIgnoreSkill ? int(armor.SaveAmount * G_SkillPropertyFloat(SKILLP_ArmorFactor)) : armor.SaveAmount;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
@ -342,6 +325,11 @@ class BasicArmorBonus : Armor
|
|||
{
|
||||
SaveAmount *= amount;
|
||||
}
|
||||
|
||||
int GetSaveAmount ()
|
||||
{
|
||||
return !bIgnoreSkill ? int(SaveAmount * G_SkillPropertyFloat(SKILLP_ArmorFactor)) : SaveAmount;
|
||||
}
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
@ -443,6 +431,10 @@ class BasicArmorPickup : Armor
|
|||
SaveAmount *= amount;
|
||||
}
|
||||
|
||||
int GetSaveAmount ()
|
||||
{
|
||||
return !bIgnoreSkill ? int(SaveAmount * G_SkillPropertyFloat(SKILLP_ArmorFactor)) : SaveAmount;
|
||||
}
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
|
Loading…
Reference in a new issue