mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-03-20 18:02:29 +00:00
Fix vanilla weapon functions passing ammo count to DepleteAmmo
This commit is contained in:
parent
429d402dc4
commit
52c878c0d7
10 changed files with 15 additions and 15 deletions
|
@ -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');
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -964,15 +964,15 @@ class Weapon : StateProvider
|
|||
count1 = (Ammo1 != null) ? Ammo1.Amount : 0;
|
||||
count2 = (Ammo2 != null) ? Ammo2.Amount : 0;
|
||||
|
||||
if (ammocount >= 0)
|
||||
if (bDehAmmo && Ammo1 == null)
|
||||
{
|
||||
lAmmoUse1 = 0;
|
||||
}
|
||||
else if (ammocount >= 0)
|
||||
{
|
||||
lAmmoUse1 = ammocount;
|
||||
lAmmoUse2 = ammocount;
|
||||
}
|
||||
else if (bDehAmmo && Ammo1 == null)
|
||||
{
|
||||
lAmmoUse1 = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
lAmmoUse1 = AmmoUse1;
|
||||
|
|
|
@ -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;
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue