diff --git a/wadsrc/static/zscript/actors/doom/doomweapons.zs b/wadsrc/static/zscript/actors/doom/doomweapons.zs index 4d3586e0540..e28cf8bf3d2 100644 --- a/wadsrc/static/zscript/actors/doom/doomweapons.zs +++ b/wadsrc/static/zscript/actors/doom/doomweapons.zs @@ -31,7 +31,7 @@ extend class StateProvider Weapon weap = player.ReadyWeapon; if (weap != null && invoker == weap && stateinfo != null && stateinfo.mStateType == STATE_Psprite) { - if (!weap.DepleteAmmo (weap.bAltFire, true, 1)) + if (!weap.DepleteAmmo (weap.bAltFire, true)) return; State flash = weap.FindState('Flash'); diff --git a/wadsrc/static/zscript/actors/doom/weaponbfg.zs b/wadsrc/static/zscript/actors/doom/weaponbfg.zs index 583688f8dc3..cb9e0ae7d38 100644 --- a/wadsrc/static/zscript/actors/doom/weaponbfg.zs +++ b/wadsrc/static/zscript/actors/doom/weaponbfg.zs @@ -107,7 +107,7 @@ extend class StateProvider if (invoker != weap || stateinfo == null || stateinfo.mStateType != STATE_Psprite) weap = null; if (weap != null) { - if (!weap.DepleteAmmo (weap.bAltFire, true, 1)) + if (!weap.DepleteAmmo (weap.bAltFire, true)) return; doesautoaim = weap.bNoAutoaim; diff --git a/wadsrc/static/zscript/actors/doom/weaponchaingun.zs b/wadsrc/static/zscript/actors/doom/weaponchaingun.zs index 58a4506881e..50fc5eea652 100644 --- a/wadsrc/static/zscript/actors/doom/weaponchaingun.zs +++ b/wadsrc/static/zscript/actors/doom/weaponchaingun.zs @@ -60,7 +60,7 @@ extend class StateProvider Weapon weap = player.ReadyWeapon; if (weap != null && invoker == weap && stateinfo != null && stateinfo.mStateType == STATE_Psprite) { - if (!weap.DepleteAmmo (weap.bAltFire, true, 1)) + if (!weap.DepleteAmmo (weap.bAltFire, true)) return; A_StartSound ("weapons/chngun", CHAN_WEAPON); diff --git a/wadsrc/static/zscript/actors/doom/weaponpistol.zs b/wadsrc/static/zscript/actors/doom/weaponpistol.zs index 0665a67aff6..b44760e7db0 100644 --- a/wadsrc/static/zscript/actors/doom/weaponpistol.zs +++ b/wadsrc/static/zscript/actors/doom/weaponpistol.zs @@ -85,7 +85,7 @@ extend class StateProvider Weapon weap = player.ReadyWeapon; if (weap != null && invoker == weap && stateinfo != null && stateinfo.mStateType == STATE_Psprite) { - if (!weap.DepleteAmmo (weap.bAltFire, true, 1)) + if (!weap.DepleteAmmo (weap.bAltFire, true)) return; player.SetPsprite(PSP_FLASH, weap.FindState('Flash'), true); diff --git a/wadsrc/static/zscript/actors/doom/weaponplasma.zs b/wadsrc/static/zscript/actors/doom/weaponplasma.zs index dd711484cad..d1a474e53e4 100644 --- a/wadsrc/static/zscript/actors/doom/weaponplasma.zs +++ b/wadsrc/static/zscript/actors/doom/weaponplasma.zs @@ -133,7 +133,7 @@ extend class StateProvider Weapon weap = player.ReadyWeapon; if (weap != null && invoker == weap && stateinfo != null && stateinfo.mStateType == STATE_Psprite) { - if (!weap.DepleteAmmo (weap.bAltFire, true, 1)) + if (!weap.DepleteAmmo (weap.bAltFire, true)) return; State flash = weap.FindState('Flash'); diff --git a/wadsrc/static/zscript/actors/doom/weaponrlaunch.zs b/wadsrc/static/zscript/actors/doom/weaponrlaunch.zs index 042b96823ae..dc7cd0ff24d 100644 --- a/wadsrc/static/zscript/actors/doom/weaponrlaunch.zs +++ b/wadsrc/static/zscript/actors/doom/weaponrlaunch.zs @@ -152,7 +152,7 @@ extend class StateProvider Weapon weap = player.ReadyWeapon; if (weap != null && invoker == weap && stateinfo != null && stateinfo.mStateType == STATE_Psprite) { - if (!weap.DepleteAmmo (weap.bAltFire, true, 1)) + if (!weap.DepleteAmmo (weap.bAltFire, true)) return; } @@ -177,7 +177,7 @@ extend class StateProvider Weapon weap = player.ReadyWeapon; if (weap != null && invoker == weap && stateinfo != null && stateinfo.mStateType == STATE_Psprite) { - if (!weap.DepleteAmmo (weap.bAltFire, true, 1)) + if (!weap.DepleteAmmo (weap.bAltFire, true)) return; } diff --git a/wadsrc/static/zscript/actors/doom/weaponshotgun.zs b/wadsrc/static/zscript/actors/doom/weaponshotgun.zs index 3b39f1d3e4a..01ca8fbc1cd 100644 --- a/wadsrc/static/zscript/actors/doom/weaponshotgun.zs +++ b/wadsrc/static/zscript/actors/doom/weaponshotgun.zs @@ -66,7 +66,7 @@ extend class StateProvider Weapon weap = player.ReadyWeapon; if (weap != null && invoker == weap && stateinfo != null && stateinfo.mStateType == STATE_Psprite) { - if (!weap.DepleteAmmo (weap.bAltFire, true, 1)) + if (!weap.DepleteAmmo (weap.bAltFire, true)) return; player.SetPsprite(PSP_FLASH, weap.FindState('Flash'), true); diff --git a/wadsrc/static/zscript/actors/doom/weaponssg.zs b/wadsrc/static/zscript/actors/doom/weaponssg.zs index cf775bde00d..1312d3c9fa6 100644 --- a/wadsrc/static/zscript/actors/doom/weaponssg.zs +++ b/wadsrc/static/zscript/actors/doom/weaponssg.zs @@ -74,7 +74,7 @@ extend class StateProvider Weapon weap = player.ReadyWeapon; if (weap != null && invoker == weap && stateinfo != null && stateinfo.mStateType == STATE_Psprite) { - if (!weap.DepleteAmmo (weap.bAltFire, true, 2)) + if (!weap.DepleteAmmo (weap.bAltFire, true)) return; player.SetPsprite(PSP_FLASH, weap.FindState('Flash'), true); diff --git a/wadsrc/static/zscript/actors/inventory/weapons.zs b/wadsrc/static/zscript/actors/inventory/weapons.zs index ca5031de7e9..49e32f3a233 100644 --- a/wadsrc/static/zscript/actors/inventory/weapons.zs +++ b/wadsrc/static/zscript/actors/inventory/weapons.zs @@ -964,14 +964,14 @@ class Weapon : StateProvider count1 = (Ammo1 != null) ? Ammo1.Amount : 0; count2 = (Ammo2 != null) ? Ammo2.Amount : 0; - if (ammocount >= 0) + if (bDehAmmo && Ammo1 == null) { - lAmmoUse1 = ammocount; - lAmmoUse2 = ammocount; + lAmmoUse1 = 0; } - else if (bDehAmmo && Ammo1 == null) + else if (ammocount >= 0) { - lAmmoUse1 = 0; + lAmmoUse1 = ammocount; + lAmmoUse2 = ammocount; } else { diff --git a/wadsrc/static/zscript/actors/strife/weaponmauler.zs b/wadsrc/static/zscript/actors/strife/weaponmauler.zs index 276402ee251..227430a9099 100644 --- a/wadsrc/static/zscript/actors/strife/weaponmauler.zs +++ b/wadsrc/static/zscript/actors/strife/weaponmauler.zs @@ -62,7 +62,7 @@ class Mauler : StrifeWeapon Weapon weap = player.ReadyWeapon; if (weap != null) { - if (!weap.DepleteAmmo (weap.bAltFire, true, 2)) + if (!weap.DepleteAmmo (weap.bAltFire, true)) return; }