mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +00:00
- moved GetSaveAmount() from the base armor class
This commit is contained in:
parent
479a992a3e
commit
5abffabb56
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