Convert INVTYPE boolean fields to flagmask (#325)

Rearranged fields from largest to smallest to remove alignment padding
This commit is contained in:
Asdow
2024-08-22 08:48:29 +03:00
committed by GitHub
parent ce02a488f0
commit 49a119e6b9
59 changed files with 1437 additions and 1336 deletions
+2 -2
View File
@@ -4257,7 +4257,7 @@ BOOLEAN FireTankCannon( SOLDIERCELL *pAttacker )
{
pItem = &pSoldier->inv[i];
if ( Item[pItem->usItem].cannon )
if (ItemIsCannon(pItem->usItem))
{
PlayAutoResolveSample( Weapon[pItem->usItem].sSound, RATE_11025, 50, 1, MIDDLEPAN );
@@ -4291,7 +4291,7 @@ BOOLEAN FireAntiTankWeapon( SOLDIERCELL *pAttacker )
{
pItem = &pSoldier->inv[i];
if ( Item[pItem->usItem].usItemClass == IC_LAUNCHER || Item[pItem->usItem].cannon )
if ( Item[pItem->usItem].usItemClass == IC_LAUNCHER || ItemIsCannon(pItem->usItem))
{
pAttacker->bWeaponSlot = (INT8)i;
if ( gpAR->fUnlimitedAmmo )