- Added Gez's AMMO_CHECKBOTH submission.

SVN r1627 (trunk)
This commit is contained in:
Christoph Oelckers 2009-05-31 22:14:23 +00:00
parent fb5e392f2f
commit 91e0f4d11d
4 changed files with 4 additions and 2 deletions

View File

@ -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

View File

@ -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

View File

@ -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;
}

View File

@ -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),
};