mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 14:51:40 +00:00
- add sv_ammofactor
to change the skill adjustment for ammo
This commit is contained in:
parent
3ad6793ba3
commit
f87c7b538a
3 changed files with 7 additions and 6 deletions
|
@ -76,6 +76,7 @@ EXTERN_CVAR (Bool, show_obituaries)
|
|||
CVAR (Float, sv_damagefactormobj, 1.0, CVAR_SERVERINFO|CVAR_CHEAT)
|
||||
CVAR (Float, sv_damagefactorfriendly, 1.0, CVAR_SERVERINFO|CVAR_CHEAT)
|
||||
CVAR (Float, sv_damagefactorplayer, 1.0, CVAR_SERVERINFO|CVAR_CHEAT)
|
||||
CVAR (Float, sv_ammofactor, 1.0, CVAR_SERVERINFO|CVAR_CHEAT) // used in the zscript ammo code
|
||||
|
||||
//
|
||||
// GET STUFF
|
||||
|
|
|
@ -94,7 +94,7 @@ class Ammo : Inventory
|
|||
|
||||
if (!item.bIgnoreSkill)
|
||||
{ // extra ammo in baby mode and nightmare mode
|
||||
receiving = int(receiving * G_SkillPropertyFloat(SKILLP_AmmoFactor));
|
||||
receiving = int(receiving * (G_SkillPropertyFloat(SKILLP_AmmoFactor) * sv_ammofactor));
|
||||
}
|
||||
int oldamount = Amount;
|
||||
|
||||
|
@ -140,7 +140,7 @@ class Ammo : Inventory
|
|||
// extra ammo in baby mode and nightmare mode
|
||||
if (!bIgnoreSkill)
|
||||
{
|
||||
amount = int(amount * G_SkillPropertyFloat(SKILLP_AmmoFactor));
|
||||
amount = int(amount * (G_SkillPropertyFloat(SKILLP_AmmoFactor) * sv_ammofactor));
|
||||
}
|
||||
|
||||
let type = GetParentAmmo();
|
||||
|
@ -258,7 +258,7 @@ class BackpackItem : Inventory
|
|||
// extra ammo in baby mode and nightmare mode
|
||||
if (!bIgnoreSkill)
|
||||
{
|
||||
amount = int(amount * G_SkillPropertyFloat(SKILLP_AmmoFactor));
|
||||
amount = int(amount * (G_SkillPropertyFloat(SKILLP_AmmoFactor) * sv_ammofactor));
|
||||
}
|
||||
if (amount < 0) amount = 0;
|
||||
if (ammoitem == NULL)
|
||||
|
@ -323,7 +323,7 @@ class BackpackItem : Inventory
|
|||
// extra ammo in baby mode and nightmare mode
|
||||
if (!bIgnoreSkill)
|
||||
{
|
||||
amount = int(amount * G_SkillPropertyFloat(SKILLP_AmmoFactor));
|
||||
amount = int(amount * (G_SkillPropertyFloat(SKILLP_AmmoFactor) * sv_ammofactor));
|
||||
}
|
||||
ammoitem.Amount += amount;
|
||||
if (ammoitem.Amount > ammoitem.MaxAmount && !sv_unlimited_pickup)
|
||||
|
|
|
@ -748,7 +748,7 @@ class Weapon : StateProvider
|
|||
// extra ammoitem in baby mode and nightmare mode
|
||||
if (!bIgnoreSkill)
|
||||
{
|
||||
amount = int(amount * G_SkillPropertyFloat(SKILLP_AmmoFactor));
|
||||
amount = int(amount * (G_SkillPropertyFloat(SKILLP_AmmoFactor) * sv_ammofactor));
|
||||
}
|
||||
ammoitem = Ammo(other.FindInventory (ammotype));
|
||||
if (ammoitem == NULL)
|
||||
|
@ -783,7 +783,7 @@ class Weapon : StateProvider
|
|||
// extra ammo in baby mode and nightmare mode
|
||||
if (!bIgnoreSkill)
|
||||
{
|
||||
amount = int(amount * G_SkillPropertyFloat(SKILLP_AmmoFactor));
|
||||
amount = int(amount * (G_SkillPropertyFloat(SKILLP_AmmoFactor) * sv_ammofactor));
|
||||
}
|
||||
ammo.Amount += amount;
|
||||
if (ammo.Amount > ammo.MaxAmount && !sv_unlimited_pickup)
|
||||
|
|
Loading…
Reference in a new issue