mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Remove unused ItemFlags
Detonator and Remote Detonator are specified by AttachmentClass No items in items.xml actually even contained these flags.
This commit is contained in:
@@ -1015,7 +1015,7 @@ UINT32 GetArmsDealerItemTypeFromItemNumber( UINT16 usItem )
|
||||
return( ARMS_DEALER_MEDICAL );
|
||||
else if (ItemIsAttachment(usItem))
|
||||
return( ARMS_DEALER_ATTACHMENTS );
|
||||
else if (ItemIsDetonator(usItem) || ItemIsRemoteDetonator(usItem) || ItemIsRemoteTrigger(usItem))
|
||||
else if ( IsAttachmentClass( usItem, (AC_DETONATOR | AC_REMOTEDET) ) || ItemIsRemoteTrigger(usItem))
|
||||
return( ARMS_DEALER_DETONATORS );
|
||||
else
|
||||
return( ARMS_DEALER_MISC );
|
||||
|
||||
@@ -2527,7 +2527,7 @@ void InternalInitEDBTooltipRegion( OBJECTTYPE * gpItemDescObject, UINT32 guiCurr
|
||||
}
|
||||
|
||||
//////////////////// REMOTE DETONATOR
|
||||
if (ItemIsRemoteDetonator(gpItemDescObject->usItem))
|
||||
if ( IsAttachmentClass( gpItemDescObject->usItem, AC_REMOTEDET ) )
|
||||
{
|
||||
swprintf( pStr, L"%s%s", szUDBGenSecondaryStatsTooltipText[ 15 ], szUDBGenSecondaryStatsExplanationsTooltipText[ 15 ]);
|
||||
SetRegionFastHelpText( &(gUDBFasthelpRegions[ iFirstDataRegion + cnt ]), pStr );
|
||||
@@ -2536,7 +2536,7 @@ void InternalInitEDBTooltipRegion( OBJECTTYPE * gpItemDescObject, UINT32 guiCurr
|
||||
}
|
||||
|
||||
//////////////////// TIMER DETONATOR
|
||||
if (ItemIsDetonator(gpItemDescObject->usItem))
|
||||
if ( IsAttachmentClass( gpItemDescObject->usItem, AC_DETONATOR ))
|
||||
{
|
||||
swprintf( pStr, L"%s%s", szUDBGenSecondaryStatsTooltipText[ 16 ], szUDBGenSecondaryStatsExplanationsTooltipText[ 16 ]);
|
||||
SetRegionFastHelpText( &(gUDBFasthelpRegions[ iFirstDataRegion + cnt ]), pStr );
|
||||
@@ -6246,16 +6246,16 @@ void DrawSecondaryStats( OBJECTTYPE * gpItemDescObject )
|
||||
}
|
||||
|
||||
//////////////////// REMOTE DETONATOR
|
||||
if ( (ItemIsRemoteDetonator(gpItemDescObject->usItem) && !fComparisonMode ) ||
|
||||
( fComparisonMode && ItemIsRemoteDetonator(gpComparedItemDescObject->usItem) ) )
|
||||
if ( (IsAttachmentClass( gpItemDescObject->usItem, AC_REMOTEDET ) && !fComparisonMode ) ||
|
||||
( fComparisonMode && IsAttachmentClass( gpComparedItemDescObject->usItem, AC_REMOTEDET )) )
|
||||
{
|
||||
BltVideoObjectFromIndex( guiSAVEBUFFER, guiItemInfoSecondaryIcon, 15, gItemDescGenSecondaryRegions[cnt].sLeft+sOffsetX, gItemDescGenSecondaryRegions[cnt].sTop+sOffsetY, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||
cnt++;
|
||||
}
|
||||
|
||||
//////////////////// TIMER DETONATOR
|
||||
if ( (ItemIsDetonator(gpItemDescObject->usItem) && !fComparisonMode ) ||
|
||||
( fComparisonMode && ItemIsDetonator(gpComparedItemDescObject->usItem)) )
|
||||
if ( (IsAttachmentClass( gpItemDescObject->usItem, AC_DETONATOR ) && !fComparisonMode ) ||
|
||||
( fComparisonMode && IsAttachmentClass( gpComparedItemDescObject->usItem, AC_DETONATOR )) )
|
||||
{
|
||||
BltVideoObjectFromIndex( guiSAVEBUFFER, guiItemInfoSecondaryIcon, 16, gItemDescGenSecondaryRegions[cnt].sLeft+sOffsetX, gItemDescGenSecondaryRegions[cnt].sTop+sOffsetY, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||
cnt++;
|
||||
|
||||
@@ -812,8 +812,8 @@ extern OBJECTTYPE gTempObject;
|
||||
#define ITEM_mortar 0x0400000000000000
|
||||
#define ITEM_duckbill 0x0800000000000000
|
||||
|
||||
#define ITEM_detonator 0x1000000000000000
|
||||
#define ITEM_remotedetonator 0x2000000000000000
|
||||
//UNUSED #define ITEM_detonator 0x1000000000000000
|
||||
//UNUSED #define ITEM_remotedetonator 0x2000000000000000
|
||||
#define ITEM_hidemuzzleflash 0x4000000000000000
|
||||
#define ITEM_rocketlauncher 0x8000000000000000
|
||||
|
||||
|
||||
+2
-4
@@ -12076,7 +12076,7 @@ BOOLEAN IsDetonatorAttached( OBJECTTYPE * pObj )
|
||||
// return TRUE;
|
||||
|
||||
for (attachmentList::iterator iter = (*pObj)[0]->attachments.begin(); iter != (*pObj)[0]->attachments.end(); ++iter) {
|
||||
if (ItemIsDetonator(iter->usItem) && iter->exists() )
|
||||
if ( IsAttachmentClass( iter->usItem, AC_DETONATOR ) && iter->exists() )
|
||||
{
|
||||
return( TRUE );
|
||||
}
|
||||
@@ -12092,7 +12092,7 @@ BOOLEAN IsRemoteDetonatorAttached( OBJECTTYPE * pObj )
|
||||
// return TRUE;
|
||||
|
||||
for (attachmentList::iterator iter = (*pObj)[0]->attachments.begin(); iter != (*pObj)[0]->attachments.end(); ++iter) {
|
||||
if (ItemIsRemoteDetonator(iter->usItem) && iter->exists() )
|
||||
if ( IsAttachmentClass( iter->usItem, AC_REMOTEDET ) && iter->exists() )
|
||||
{
|
||||
return( TRUE );
|
||||
}
|
||||
@@ -16081,8 +16081,6 @@ BOOLEAN ItemIsFlare(UINT16 usItem) { return HasItemFlag(usItem, ITEM_flare); }
|
||||
BOOLEAN ItemIsGrenadeLauncher(UINT16 usItem) { return HasItemFlag(usItem, ITEM_grenadelauncher); }
|
||||
BOOLEAN ItemIsMortar(UINT16 usItem) { return HasItemFlag(usItem, ITEM_mortar); }
|
||||
BOOLEAN ItemIsDuckbill(UINT16 usItem) { return HasItemFlag(usItem, ITEM_duckbill); }
|
||||
BOOLEAN ItemIsDetonator(UINT16 usItem) { return HasItemFlag(usItem, ITEM_detonator); }
|
||||
BOOLEAN ItemIsRemoteDetonator(UINT16 usItem) { return HasItemFlag(usItem, ITEM_remotedetonator); }
|
||||
BOOLEAN ItemHasHiddenMuzzleFlash(UINT16 usItem) { return HasItemFlag(usItem, ITEM_hidemuzzleflash); }
|
||||
BOOLEAN ItemIsRocketLauncher(UINT16 usItem) { return HasItemFlag(usItem, ITEM_rocketlauncher); }
|
||||
// usItemFlag2
|
||||
|
||||
@@ -204,8 +204,6 @@ BOOLEAN ItemIsFlare(UINT16 usItem);
|
||||
BOOLEAN ItemIsGrenadeLauncher(UINT16 usItem);
|
||||
BOOLEAN ItemIsMortar(UINT16 usItem);
|
||||
BOOLEAN ItemIsDuckbill(UINT16 usItem);
|
||||
BOOLEAN ItemIsDetonator(UINT16 usItem);
|
||||
BOOLEAN ItemIsRemoteDetonator(UINT16 usItem);
|
||||
BOOLEAN ItemHasHiddenMuzzleFlash(UINT16 usItem);
|
||||
BOOLEAN ItemIsRocketLauncher(UINT16 usItem);
|
||||
BOOLEAN ItemIsSingleShotRocketLauncher(UINT16 usItem);
|
||||
|
||||
@@ -863,18 +863,6 @@ itemEndElementHandle(void *userData, const XML_Char *name)
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag |= ITEM_duckbill;
|
||||
}
|
||||
else if(strcmp(name, "Detonator") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag |= ITEM_detonator;
|
||||
}
|
||||
else if(strcmp(name, "RemoteDetonator") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
if ((BOOLEAN)atol(pData->szCharData))
|
||||
pData->curItem.usItemFlag |= ITEM_remotedetonator;
|
||||
}
|
||||
else if(strcmp(name, "ThermalOptics") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
@@ -2427,8 +2415,6 @@ BOOLEAN WriteItemStats()
|
||||
if ( ItemIsGrenadeLauncher( cnt ) ) FilePrintf( hFile, "\t\t<GrenadeLauncher>%d</GrenadeLauncher>\r\n", 1 );
|
||||
if ( ItemIsMortar( cnt ) ) FilePrintf( hFile, "\t\t<Mortar>%d</Mortar>\r\n", 1 );
|
||||
if ( ItemIsDuckbill( cnt ) ) FilePrintf( hFile, "\t\t<Duckbill>%d</Duckbill>\r\n", 1 );
|
||||
if ( ItemIsDetonator( cnt ) ) FilePrintf( hFile, "\t\t<Detonator>%d</Detonator>\r\n", 1 );
|
||||
if ( ItemIsRemoteDetonator( cnt ) ) FilePrintf( hFile, "\t\t<RemoteDetonator>%d</RemoteDetonator>\r\n", 1 );
|
||||
if ( ItemHasHiddenMuzzleFlash( cnt ) ) FilePrintf( hFile, "\t\t<HideMuzzleFlash>%d</HideMuzzleFlash>\r\n", 1 );
|
||||
if ( ItemIsRocketLauncher( cnt ) ) FilePrintf( hFile, "\t\t<RocketLauncher>%d</RocketLauncher>\r\n", 1 );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user