- Added Gez's dropammofactor submission with some necessary changes. Also merged

redundant ammo multiplication code from P_DropItem and ADehackedPickup::TryPickup.
- Restricted native action function definitions to zdoom.pk3.


SVN r1123 (trunk)
This commit is contained in:
Christoph Oelckers 2008-08-07 08:18:48 +00:00
commit 0ad1bfe87e
9 changed files with 82 additions and 34 deletions

View file

@ -3232,6 +3232,7 @@ static void ParseSkill (FScanner &sc)
skill.AmmoFactor = FRACUNIT;
skill.DoubleAmmoFactor = 2*FRACUNIT;
skill.DropAmmoFactor = -1;
skill.DamageFactor = FRACUNIT;
skill.FastMonsters = false;
skill.DisableCheats = false;
@ -3262,6 +3263,11 @@ static void ParseSkill (FScanner &sc)
sc.MustGetFloat ();
skill.DoubleAmmoFactor = FLOAT2FIXED(sc.Float);
}
else if (sc.Compare ("dropammofactor"))
{
sc.MustGetFloat ();
skill.DropAmmoFactor = FLOAT2FIXED(sc.Float);
}
else if (sc.Compare ("damagefactor"))
{
sc.MustGetFloat ();
@ -3387,6 +3393,9 @@ int G_SkillProperty(ESkillProperty prop)
}
return AllSkills[gameskill].AmmoFactor;
case SKILLP_DropAmmoFactor:
return AllSkills[gameskill].DropAmmoFactor;
case SKILLP_DamageFactor:
return AllSkills[gameskill].DamageFactor;
@ -3437,6 +3446,7 @@ FSkillInfo &FSkillInfo::operator=(const FSkillInfo &other)
Name = other.Name;
AmmoFactor = other.AmmoFactor;
DoubleAmmoFactor = other.DoubleAmmoFactor;
DropAmmoFactor = other.DropAmmoFactor;
DamageFactor = other.DamageFactor;
FastMonsters = other.FastMonsters;
DisableCheats = other.DisableCheats;