mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-01-18 15:42:34 +00:00
- Added Gez's AMMO_CHECKBOTH submission.
SVN r1627 (trunk)
This commit is contained in:
parent
fb5e392f2f
commit
91e0f4d11d
4 changed files with 4 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
|||
May 31, 2009 (Changes by Graf Zahl)
|
||||
- Added Gez's AMMO_CHECKBOTH submission.
|
||||
- Added Gez's THRUSPECIES submission.
|
||||
- Added loading directories into the lump directory.
|
||||
- fixed: The Dehacked parser could not parse flag values with the highest bit
|
||||
|
|
|
@ -316,7 +316,7 @@ enum
|
|||
WIF_ALT_USES_BOTH = 0x00000100, // alternate fire uses both ammo
|
||||
WIF_WIMPY_WEAPON = 0x00000200, // change away when ammo for another weapon is replenished
|
||||
WIF_POWERED_UP = 0x00000400, // this is a tome-of-power'ed version of its sister
|
||||
|
||||
WIF_AMMO_CHECKBOTH = 0x00000800, // check for both primary and secondary fire before switching it off
|
||||
WIF_NO_AUTO_SWITCH = 0x00001000, // never switch to this weapon when it's picked up
|
||||
WIF_STAFF2_KICKBACK = 0x00002000, // the powered-up Heretic staff has special kickba
|
||||
|
||||
|
|
|
@ -438,7 +438,7 @@ bool AWeapon::CheckAmmo (int fireMode, bool autoSwitch, bool requireAmmo)
|
|||
{ // If this weapon has no alternate fire, then there is never enough ammo for it
|
||||
enough &= 1;
|
||||
}
|
||||
if ((enough & enoughmask) == enoughmask)
|
||||
if (((enough & enoughmask) == enoughmask) || (enough && (WeaponFlags & WIF_AMMO_CHECKBOTH)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -277,6 +277,7 @@ static FFlagDef WeaponFlags[] =
|
|||
DEFINE_FLAG(WIF_BOT, BFG, AWeapon, WeaponFlags),
|
||||
DEFINE_FLAG(WIF, CHEATNOTWEAPON, AWeapon, WeaponFlags),
|
||||
DEFINE_FLAG(WIF, NO_AUTO_SWITCH, AWeapon, WeaponFlags),
|
||||
DEFINE_FLAG(WIF, AMMO_CHECKBOTH, AWeapon, WeaponFlags),
|
||||
|
||||
DEFINE_DUMMY_FLAG(NOLMS),
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue