mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
Convert INVTYPE boolean fields to flagmask (#325)
Rearranged fields from largest to smallest to remove alignment padding
This commit is contained in:
+2
-2
@@ -1198,7 +1198,7 @@ void EnemyHeliMANPADSCheck( INT16 id )
|
||||
if ( pObj )
|
||||
{
|
||||
// abort if this is a launcher without ammo
|
||||
if ( Item[pObj->usItem].rocketlauncher && !Item[pObj->usItem].singleshotrocketlauncher )
|
||||
if (ItemIsRocketLauncher(pObj->usItem) && !ItemIsSingleShotRocketLauncher(pObj->usItem))
|
||||
{
|
||||
OBJECTTYPE* pAttachment = FindAttachmentByClass( pObj, IC_GRENADE );
|
||||
if ( !pAttachment->exists( ) )
|
||||
@@ -1227,7 +1227,7 @@ void EnemyHeliMANPADSCheck( INT16 id )
|
||||
MapScreenMessage( FONT_MCOLOR_LTRED, MSG_INTERFACE, szEnemyHeliText[7], pSoldier->GetName( ), Item[pObj->usItem].szItemName, pStrSectorName );
|
||||
|
||||
// 'fire' (remove shot)
|
||||
if ( Item[pObj->usItem].singleshotrocketlauncher )
|
||||
if (ItemIsSingleShotRocketLauncher(pObj->usItem))
|
||||
{
|
||||
CreateItem( Item[pObj->usItem].discardedlauncheritem, (*pObj)[0]->data.objectStatus, pObj );
|
||||
|
||||
|
||||
+11
-11
@@ -3349,7 +3349,7 @@ UINT8 CalculateRepairPointsForRepairman(SOLDIERTYPE *pSoldier, UINT16 *pusMaxPts
|
||||
}
|
||||
|
||||
// can't repair at all without a toolkit
|
||||
if (!Item[pSoldier->inv[HANDPOS].usItem].toolkit )
|
||||
if (!ItemIsToolkit(pSoldier->inv[HANDPOS].usItem))
|
||||
{
|
||||
*pusMaxPts = 0;
|
||||
return(0);
|
||||
@@ -4063,7 +4063,7 @@ UINT16 ToolKitPoints(SOLDIERTYPE *pSoldier)
|
||||
// CHRISL: Changed to dynamically determine max inventory locations.
|
||||
for (int ubPocket=HANDPOS; ubPocket < NUM_INV_SLOTS; ++ubPocket)
|
||||
{
|
||||
if( Item[pSoldier->inv[ ubPocket ].usItem].toolkit )
|
||||
if(ItemIsToolkit(pSoldier->inv[ ubPocket ].usItem))
|
||||
{
|
||||
usKitpts += TotalPoints( &( pSoldier->inv[ ubPocket ] ) );
|
||||
}
|
||||
@@ -5138,7 +5138,7 @@ void DoActualRepair( SOLDIERTYPE * pSoldier, UINT16 usItem, INT16 * pbStatus, IN
|
||||
|
||||
// repairs on electronic items take twice as long if the guy doesn't have the skill
|
||||
// Technician/Electronic traits - repairing electronic items - SANDRO
|
||||
if ( Item[ usItem ].electronic )
|
||||
if (ItemIsElectronic(usItem))
|
||||
{
|
||||
if (gGameOptions.fNewTraitSystem)
|
||||
{
|
||||
@@ -5745,7 +5745,7 @@ void HandleRepairBySoldier( SOLDIERTYPE *pSoldier )
|
||||
BOOLEAN IsItemRepairable(SOLDIERTYPE* pSoldier, UINT16 usItem, INT16 bStatus, INT16 bThreshold )
|
||||
{
|
||||
// check to see if item can/needs to be repaired
|
||||
if ( ( bStatus < 100) && ( Item[ usItem ].repairable ) )
|
||||
if ( ( bStatus < 100) && ItemIsRepairable(usItem) )
|
||||
{
|
||||
if ( gGameExternalOptions.fAdvRepairSystem )
|
||||
{
|
||||
@@ -10459,7 +10459,7 @@ BOOLEAN MakeSureToolKitIsInHand( SOLDIERTYPE *pSoldier )
|
||||
INT8 bPocket = 0, bonus = -101, bToolkitPocket = NO_SLOT;
|
||||
|
||||
// if there isn't a toolkit in his hand
|
||||
if( Item[pSoldier->inv[ HANDPOS].usItem].toolkit )
|
||||
if(ItemIsToolkit(pSoldier->inv[ HANDPOS].usItem))
|
||||
{
|
||||
bonus = Item[pSoldier->inv[ HANDPOS].usItem].RepairModifier;
|
||||
bToolkitPocket = HANDPOS;
|
||||
@@ -10469,7 +10469,7 @@ BOOLEAN MakeSureToolKitIsInHand( SOLDIERTYPE *pSoldier )
|
||||
// CHRISL: Changed to dynamically determine max inventory locations.
|
||||
for (bPocket = SECONDHANDPOS; bPocket < NUM_INV_SLOTS; ++bPocket)
|
||||
{
|
||||
if( Item[pSoldier->inv[ bPocket ].usItem].toolkit && Item[pSoldier->inv[ bPocket ].usItem].RepairModifier > bonus)
|
||||
if(ItemIsToolkit(pSoldier->inv[ bPocket ].usItem) && Item[pSoldier->inv[ bPocket ].usItem].RepairModifier > bonus)
|
||||
{
|
||||
bonus = Item[pSoldier->inv[ bPocket ].usItem].RepairModifier;
|
||||
bToolkitPocket = bPocket;
|
||||
@@ -10503,7 +10503,7 @@ BOOLEAN MakeSureMedKitIsInHand( SOLDIERTYPE *pSoldier , bool bAllow1stAidKit)
|
||||
fTeamPanelDirty = TRUE;
|
||||
|
||||
// if there is a MEDICAL BAG in his hand, we're set
|
||||
if ( Item[pSoldier->inv[ HANDPOS ].usItem].medicalkit )
|
||||
if (ItemIsMedicalKit(pSoldier->inv[ HANDPOS ].usItem))
|
||||
{
|
||||
return(TRUE);
|
||||
}
|
||||
@@ -10511,7 +10511,7 @@ BOOLEAN MakeSureMedKitIsInHand( SOLDIERTYPE *pSoldier , bool bAllow1stAidKit)
|
||||
// run through rest of inventory looking 1st for MEDICAL BAGS, swap the first one into hand if found
|
||||
for (bPocket = SECONDHANDPOS; bPocket < NUM_INV_SLOTS; ++bPocket)
|
||||
{
|
||||
if ( Item[pSoldier->inv[ bPocket ].usItem].medicalkit )
|
||||
if (ItemIsMedicalKit(pSoldier->inv[ bPocket ].usItem))
|
||||
{
|
||||
medkit_found = true;
|
||||
can_swap = true;
|
||||
@@ -10579,7 +10579,7 @@ BOOLEAN MakeSureMedKitIsInHand( SOLDIERTYPE *pSoldier , bool bAllow1stAidKit)
|
||||
return FALSE;
|
||||
|
||||
// we didn't find a medical bag, so settle for a FIRST AID KIT
|
||||
if ( Item[pSoldier->inv[ HANDPOS ].usItem].firstaidkit )
|
||||
if (ItemIsFirstAidKit(pSoldier->inv[ HANDPOS ].usItem))
|
||||
{
|
||||
return(TRUE);
|
||||
}
|
||||
@@ -10588,10 +10588,10 @@ BOOLEAN MakeSureMedKitIsInHand( SOLDIERTYPE *pSoldier , bool bAllow1stAidKit)
|
||||
// CHRISL: Changed to dynamically determine max inventory locations.
|
||||
for (bPocket = SECONDHANDPOS; bPocket < NUM_INV_SLOTS; ++bPocket)
|
||||
{
|
||||
if ( Item[pSoldier->inv[ bPocket ].usItem].firstaidkit )
|
||||
if (ItemIsFirstAidKit(pSoldier->inv[ bPocket ].usItem))
|
||||
{
|
||||
// CHRISL: This needs to start with the first "non-big" pocket.
|
||||
if( ( Item[ pSoldier -> inv[ HANDPOS ].usItem ].twohanded ) && ( bPocket >= SMALLPOCKSTART ) )
|
||||
if( (ItemIsTwoHanded(pSoldier->inv[HANDPOS].usItem) && (bPocket >= SMALLPOCKSTART)))
|
||||
{
|
||||
// first move from hand to second hand
|
||||
SwapObjs( pSoldier, HANDPOS, SECONDHANDPOS, TRUE );
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -627,7 +627,7 @@ void HourlySmokerUpdate( )
|
||||
INT8 invsize = (INT8)pSoldier->inv.size( ); // remember inventorysize, so we don't call size() repeatedly
|
||||
for ( INT8 bLoop = 0; bLoop < invsize; ++bLoop ) // ... for all items in our inventory ...
|
||||
{
|
||||
if ( pSoldier->inv[bLoop].exists( ) && Item[pSoldier->inv[bLoop].usItem].cigarette )
|
||||
if ( pSoldier->inv[bLoop].exists( ) && ItemIsCigarette(pSoldier->inv[bLoop].usItem) )
|
||||
{
|
||||
pObj = &(pSoldier->inv[bLoop]);
|
||||
|
||||
|
||||
@@ -1481,7 +1481,7 @@ void MapInvenPoolSlots(MOUSE_REGION * pRegion, INT32 iReason )
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( _KeyDown(SHIFT) && gpItemPointer == NULL && Item[twItem->object.usItem].usItemClass == IC_GUN && (twItem->object)[0]->data.gun.ubGunShotsLeft && !(Item[twItem->object.usItem].singleshotrocketlauncher))
|
||||
if ( _KeyDown(SHIFT) && gpItemPointer == NULL && Item[twItem->object.usItem].usItemClass == IC_GUN && (twItem->object)[0]->data.gun.ubGunShotsLeft && !ItemIsSingleShotRocketLauncher(twItem->object.usItem))
|
||||
{
|
||||
EmptyWeaponMagazine( &twItem->object, &gItemPointer );
|
||||
InternalMAPBeginItemPointer( MercPtrs[gCharactersList[bSelectedInfoChar].usSolID] );
|
||||
@@ -6009,7 +6009,7 @@ void HandleItemCooldownFunctions( OBJECTTYPE* itemStack, INT32 deltaSeconds, BOO
|
||||
|
||||
//original code by flugente, renamed variables to fit here, removed "min (OVERHEATING_MAX_TEMPERATURE, newValue)" for dirt to allow to go beyond maximum and deduct later the same amount if neccessary.
|
||||
// ... if we use overheating and item is a gun, a launcher or a barrel ...
|
||||
if ( gGameExternalOptions.fWeaponOverheating && ( Item[itemStack->usItem].usItemClass & (IC_GUN|IC_LAUNCHER) || Item[itemStack->usItem].barrel == TRUE ) )
|
||||
if ( gGameExternalOptions.fWeaponOverheating && ( Item[itemStack->usItem].usItemClass & (IC_GUN|IC_LAUNCHER) || ItemIsBarrel(itemStack->usItem) ) )
|
||||
{
|
||||
for(INT16 i = 0; i < itemStack->ubNumberOfObjects; ++i) // ... there might be multiple items here (item stack), so for each one ...
|
||||
{
|
||||
@@ -6017,7 +6017,7 @@ void HandleItemCooldownFunctions( OBJECTTYPE* itemStack, INT32 deltaSeconds, BOO
|
||||
|
||||
FLOAT cooldownfactor = GetItemCooldownFactor(itemStack); // ... get item cooldown factor provided of attachments ...
|
||||
|
||||
if ( Item[itemStack->usItem].barrel == TRUE ) // ... a barrel lying around cools down a bit faster ...
|
||||
if (ItemIsBarrel(itemStack->usItem)) // ... a barrel lying around cools down a bit faster ...
|
||||
cooldownfactor *= gGameExternalOptions.iCooldownModificatorLonelyBarrel;
|
||||
|
||||
FLOAT newguntemperature = max(0.0f, guntemperature - tickspassed * cooldownfactor ); // ... calculate new temperature ...
|
||||
|
||||
@@ -4417,16 +4417,16 @@ void SetupInfo()
|
||||
// (Item[i].usItemClass & IC_AMMO) && (Magazine[ Item[i].ubClassIndex ].ubMagType == AMMO_BOX or AMMO_CRATE?)
|
||||
for (UINT16 i = 0; i < MAXITEMS; ++i)
|
||||
{
|
||||
if (Item[i].gascan) ItemIdCache::gasCans.push_back(i);
|
||||
else if (Item[i].firstaidkit) ItemIdCache::firstAidKits.push_back(i);
|
||||
else if (Item[i].medicalkit) ItemIdCache::medKits.push_back(i);
|
||||
else if (Item[i].toolkit) ItemIdCache::toolKits.push_back(i);
|
||||
if (ItemIsGascan(i)) ItemIdCache::gasCans.push_back(i);
|
||||
else if (ItemIsFirstAidKit(i)) ItemIdCache::firstAidKits.push_back(i);
|
||||
else if (ItemIsMedicalKit(i)) ItemIdCache::medKits.push_back(i);
|
||||
else if (ItemIsToolkit(i)) ItemIdCache::toolKits.push_back(i);
|
||||
else if (Item[i].usItemClass & IC_AMMO)
|
||||
{
|
||||
if (Magazine[Item[i].ubClassIndex].ubMagType == AMMO_BOX)
|
||||
{
|
||||
if ((gGameOptions.fGunNut || !Item[i].biggunlist)
|
||||
&& (gGameOptions.ubGameStyle == STYLE_SCIFI || !Item[i].scifi))
|
||||
if ((gGameOptions.fGunNut || !ItemIsOnlyInTonsOfGuns(i))
|
||||
&& (gGameOptions.ubGameStyle == STYLE_SCIFI || !ItemIsOnlyInScifi(i)))
|
||||
{
|
||||
// coolness runs from 1-10, so apply offset
|
||||
const UINT8 coolness = min(max(1, Item[i].ubCoolness), 10);
|
||||
|
||||
@@ -1334,7 +1334,7 @@ void CheckForMissingHospitalSupplies( void )
|
||||
}
|
||||
}
|
||||
#endif//obsoleteCode
|
||||
if ( Item[pObj->usItem].firstaidkit || Item[pObj->usItem].medicalkit || pObj->usItem == REGEN_BOOSTER || pObj->usItem == ADRENALINE_BOOSTER )
|
||||
if (ItemIsFirstAidKit(pObj->usItem) || ItemIsMedicalKit(pObj->usItem) || pObj->usItem == REGEN_BOOSTER || pObj->usItem == ADRENALINE_BOOSTER )
|
||||
{
|
||||
for (StackedObjects::iterator iter = pObj->objectStack.begin(); iter != pObj->objectStack.end(); ++iter) {
|
||||
if ( iter->data.objectStatus > 60 )
|
||||
|
||||
@@ -5137,7 +5137,7 @@ void AddFuelToVehicle( SOLDIERTYPE *pSoldier, SOLDIERTYPE *pVehicle )
|
||||
OBJECTTYPE *pItem;
|
||||
INT16 sFuelNeeded, sFuelAvailable, sFuelAdded;
|
||||
pItem = &pSoldier->inv[ HANDPOS ];
|
||||
if( !Item[pItem->usItem].gascan )
|
||||
if( !ItemIsGascan(pItem->usItem))
|
||||
{
|
||||
#ifdef JA2BETAVERSION
|
||||
CHAR16 str[ 100 ];
|
||||
|
||||
@@ -500,18 +500,18 @@ void UpdateTransportGroupInventory()
|
||||
if (!ItemIsLegal(i, TRUE)) continue;
|
||||
if ((Item[i].usItemClass & IC_AMMO) == 0 && (Item[i].iTransportGroupMaxProgress == 0 || Item[i].iTransportGroupMinProgress > progress || progress > Item[i].iTransportGroupMaxProgress)) continue;
|
||||
|
||||
if (Item[i].medical)
|
||||
if (ItemIsMedical(i))
|
||||
{
|
||||
if (Item[i].firstaidkit) itemMap[MEDICAL_FIRSTAIDKITS].push_back(i);
|
||||
else if (Item[i].medicalkit) itemMap[MEDICAL_MEDKITS].push_back(i);
|
||||
if (ItemIsFirstAidKit(i)) itemMap[MEDICAL_FIRSTAIDKITS].push_back(i);
|
||||
else if (ItemIsMedicalKit(i)) itemMap[MEDICAL_MEDKITS].push_back(i);
|
||||
else itemMap[MEDICAL_OTHER].push_back(i);
|
||||
}
|
||||
else if (Item[i].gascan) itemMap[GAS_CANS].push_back(i);
|
||||
else if (Item[i].toolkit) itemMap[TOOL_KITS].push_back(i);
|
||||
else if (ItemIsGascan(i)) itemMap[GAS_CANS].push_back(i);
|
||||
else if (ItemIsToolkit(i)) itemMap[TOOL_KITS].push_back(i);
|
||||
else if (HasItemFlag(i, RADIO_SET)) itemMap[RADIOS].push_back(i);
|
||||
else if (Item[i].usItemClass & IC_GRENADE)
|
||||
{
|
||||
if (Item[i].glgrenade == 0
|
||||
if (!ItemIsGLgrenade(i)
|
||||
&& Item[i].attachmentclass != AC_GRENADE // not for a grenade launcher
|
||||
&& Item[i].attachmentclass != AC_ROCKET) // not for a rocket launcher
|
||||
itemMap[GRENADE_THROWN].push_back(i);
|
||||
@@ -523,7 +523,7 @@ void UpdateTransportGroupInventory()
|
||||
itemMap[BACKPACKS].push_back(i);
|
||||
}
|
||||
}
|
||||
else if (Item[i].camouflagekit) itemMap[CAMO_KITS].push_back(i);
|
||||
else if (ItemIsCamoKit(i)) itemMap[CAMO_KITS].push_back(i);
|
||||
else if (Item[i].usItemClass & IC_MISC)
|
||||
{
|
||||
switch (Item[i].attachmentclass)
|
||||
@@ -555,11 +555,11 @@ void UpdateTransportGroupInventory()
|
||||
{
|
||||
itemMap[GUNS].push_back(i);
|
||||
}
|
||||
else if (Item[i].grenadelauncher)
|
||||
else if (ItemIsGrenadeLauncher(i))
|
||||
{
|
||||
itemMap[GRENADELAUNCHERS].push_back(i);
|
||||
}
|
||||
else if (Item[i].rocketlauncher)
|
||||
else if (ItemIsRocketLauncher(i))
|
||||
{
|
||||
itemMap[ROCKETLAUNCHERS].push_back(i);
|
||||
}
|
||||
@@ -713,7 +713,7 @@ void UpdateTransportGroupInventory()
|
||||
|
||||
case ROCKETLAUNCHERS:
|
||||
{
|
||||
addItemToInventory(pSoldier, id, Item[id].singleshotrocketlauncher ? 3 : 1);
|
||||
addItemToInventory(pSoldier, id, ItemIsSingleShotRocketLauncher(id) ? 3 : 1);
|
||||
|
||||
const UINT16 launchableId = PickARandomLaunchable(id);
|
||||
if (launchableId == 0) continue; // no launchable matches, skip
|
||||
@@ -773,7 +773,7 @@ void UpdateTransportGroupInventory()
|
||||
for (int i = 0; i < pSoldier->inv.size(); ++i)
|
||||
{
|
||||
OBJECTTYPE* item = &pSoldier->inv[i];
|
||||
if (item->exists() && Item[item->usItem].defaultundroppable == FALSE)
|
||||
if (item->exists() && ItemIsUndroppableByDefault(item->usItem) == FALSE)
|
||||
{
|
||||
item->fFlags &= ~OBJECT_UNDROPPABLE;
|
||||
}
|
||||
@@ -861,7 +861,7 @@ void UpdateTransportGroupInventory()
|
||||
for (int i = 0; i < pSoldier->inv.size(); ++i)
|
||||
{
|
||||
OBJECTTYPE* item = &pSoldier->inv[i];
|
||||
if (item->exists() && Item[item->usItem].defaultundroppable == FALSE)
|
||||
if (item->exists() && ItemIsUndroppableByDefault(item->usItem) == FALSE)
|
||||
{
|
||||
item->fFlags &= ~OBJECT_UNDROPPABLE;
|
||||
}
|
||||
|
||||
@@ -9797,12 +9797,12 @@ void BltCharInvPanel()
|
||||
UINT32 fontColour = FONT_MCOLOR_RED;
|
||||
|
||||
// robot targeting bonus
|
||||
if (Item[pSoldier->inv[ROBOT_TARGETING_SLOT].usItem].fProvidesRobotLaserBonus)
|
||||
if (ItemProvidesRobotLaserBonus(pSoldier->inv[ROBOT_TARGETING_SLOT].usItem))
|
||||
{
|
||||
swprintf(text, szRobotText[ROBOT_TEXT_LASER]);
|
||||
fontColour = FONT_MCOLOR_LTGREEN;
|
||||
}
|
||||
else if (Item[pSoldier->inv[ROBOT_TARGETING_SLOT].usItem].fProvidesRobotNightVision)
|
||||
else if (ItemProvidesRobotNightvision(pSoldier->inv[ROBOT_TARGETING_SLOT].usItem))
|
||||
{
|
||||
swprintf(text, szRobotText[ROBOT_TEXT_NIGHT_VISION]);
|
||||
fontColour = FONT_MCOLOR_LTGREEN;
|
||||
@@ -9825,7 +9825,7 @@ void BltCharInvPanel()
|
||||
swprintf(text, szRobotText[ROBOT_TEXT_STAT_BONUSES]);
|
||||
fontColour = FONT_MCOLOR_LTGREEN;
|
||||
}
|
||||
else if (Item[pSoldier->inv[ROBOT_CHASSIS_SLOT].usItem].fProvidesRobotCamo)
|
||||
else if (ItemProvidesRobotCamo(pSoldier->inv[ROBOT_CHASSIS_SLOT].usItem))
|
||||
{
|
||||
swprintf(text, szRobotText[ROBOT_TEXT_CAMO]);
|
||||
fontColour = FONT_MCOLOR_LTGREEN;
|
||||
@@ -9858,12 +9858,12 @@ void BltCharInvPanel()
|
||||
swprintf(text, L"%s", szRobotText[ROBOT_TEXT_RADIO]);
|
||||
fontColour = FONT_MCOLOR_LTGREEN;
|
||||
}
|
||||
else if (Item[pSoldier->inv[ROBOT_UTILITY_SLOT].usItem].metaldetector == 1)
|
||||
else if (ItemIsMetalDetector(pSoldier->inv[ROBOT_UTILITY_SLOT].usItem))
|
||||
{
|
||||
swprintf(text, L"%s", szRobotText[ROBOT_TEXT_METAL_DETECTOR]);
|
||||
fontColour = FONT_MCOLOR_LTGREEN;
|
||||
}
|
||||
else if (Item[pSoldier->inv[ROBOT_UTILITY_SLOT].usItem].xray == 1)
|
||||
else if (ItemHasXRay(pSoldier->inv[ROBOT_UTILITY_SLOT].usItem))
|
||||
{
|
||||
swprintf(text, L"%s", szRobotText[ROBOT_TEXT_XRAY]);
|
||||
fontColour = FONT_MCOLOR_LTGREEN;
|
||||
@@ -10442,7 +10442,7 @@ void MAPInvClickCallback( MOUSE_REGION *pRegion, INT32 iReason )
|
||||
{
|
||||
if ( !InItemDescriptionBox( ) )
|
||||
{
|
||||
if ( _KeyDown(SHIFT) && gpItemPointer == NULL && Item[pSoldier->inv[ uiHandPos ].usItem].usItemClass == IC_GUN && (pSoldier->inv[ uiHandPos ])[uiHandPos]->data.gun.ubGunShotsLeft > 0 && !(Item[pSoldier->inv[ uiHandPos ].usItem].singleshotrocketlauncher) )
|
||||
if ( _KeyDown(SHIFT) && gpItemPointer == NULL && Item[pSoldier->inv[ uiHandPos ].usItem].usItemClass == IC_GUN && (pSoldier->inv[ uiHandPos ])[uiHandPos]->data.gun.ubGunShotsLeft > 0 && !ItemIsSingleShotRocketLauncher(pSoldier->inv[ uiHandPos ].usItem) )
|
||||
{
|
||||
EmptyWeaponMagazine( &(pSoldier->inv[ uiHandPos ]), &gItemPointer, uiHandPos );
|
||||
InternalMAPBeginItemPointer( pSoldier );
|
||||
|
||||
Reference in New Issue
Block a user