diff --git a/src/playsim/p_interaction.cpp b/src/playsim/p_interaction.cpp index b58ba727df..8a8732b3bf 100644 --- a/src/playsim/p_interaction.cpp +++ b/src/playsim/p_interaction.cpp @@ -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 diff --git a/wadsrc/static/zscript/actors/inventory/ammo.zs b/wadsrc/static/zscript/actors/inventory/ammo.zs index 52b3d8f227..e30a5de604 100644 --- a/wadsrc/static/zscript/actors/inventory/ammo.zs +++ b/wadsrc/static/zscript/actors/inventory/ammo.zs @@ -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) diff --git a/wadsrc/static/zscript/actors/inventory/weapons.zs b/wadsrc/static/zscript/actors/inventory/weapons.zs index eca9122912..e3284f9130 100644 --- a/wadsrc/static/zscript/actors/inventory/weapons.zs +++ b/wadsrc/static/zscript/actors/inventory/weapons.zs @@ -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)