mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
Merge branch 'master' into ExtraMercs
This commit is contained in:
@@ -8306,7 +8306,7 @@ void HandleTBLevelUp(void)
|
||||
|
||||
void HandleTBBackpacks(void)
|
||||
{
|
||||
if (UsingNewInventorySystem)
|
||||
if (UsingNewInventorySystem())
|
||||
{
|
||||
bool backpackDropped = false;
|
||||
SOLDIERTYPE* pTeamSoldier;
|
||||
@@ -8315,7 +8315,7 @@ void HandleTBBackpacks(void)
|
||||
{
|
||||
pTeamSoldier = MercPtrs[ubLoop];
|
||||
|
||||
if (pTeamSoldier->flags.DropPackFlag)
|
||||
if (OK_CONTROLLABLE_MERC(pTeamSoldier) && pTeamSoldier->flags.DropPackFlag)
|
||||
{
|
||||
backpackDropped = true;
|
||||
break;
|
||||
@@ -8966,7 +8966,7 @@ void HandleTacticalTakeInvItem( INT32 iType )
|
||||
for(UINT8 i = GUNSLINGPOCKPOS; i < NUM_INV_SLOTS; ++i)
|
||||
{
|
||||
if ( pSoldier->inv[i].exists() &&
|
||||
!Item[ pSoldier->inv[i].usItem ].twohanded &&
|
||||
!ItemIsTwoHanded(pSoldier->inv[i].usItem) &&
|
||||
( iType > 0 ? ( pSoldier->inv[i].usItem == iType ) : ( InvItemType( pSoldier->inv[i].usItem ) == iType ) ) )
|
||||
{
|
||||
ubItemSlot = i;
|
||||
@@ -9016,7 +9016,7 @@ INT32 InvItemType( UINT16 usItem )
|
||||
{
|
||||
if( usItem == XRAY_DEVICE )
|
||||
return INV_ITEM_TYPE_XRAY;
|
||||
if( Item[ usItem ].firstaidkit )
|
||||
if(ItemIsFirstAidKit(usItem))
|
||||
return INV_ITEM_TYPE_FIRSTAID;
|
||||
if( Item[ usItem ].usItemClass == IC_BLADE )
|
||||
return INV_ITEM_TYPE_MELEE;
|
||||
@@ -9030,9 +9030,9 @@ INT32 InvItemType( UINT16 usItem )
|
||||
return INV_ITEM_TYPE_BINOCULARS;
|
||||
if( HasItemFlag( usItem, TASER ) )
|
||||
return INV_ITEM_TYPE_TASER;
|
||||
if( Item[ usItem ].usItemClass == IC_GUN && !Item[ usItem ].twohanded && Weapon[Item[ usItem ].ubClassIndex].ubWeaponType <= GUN_SMG )
|
||||
if( Item[ usItem ].usItemClass == IC_GUN && !ItemIsTwoHanded(usItem) && Weapon[Item[ usItem ].ubClassIndex].ubWeaponType <= GUN_SMG )
|
||||
return INV_ITEM_TYPE_SIDEARM;
|
||||
if( Item[ usItem ].usItemClass == IC_MISC && Item[ usItem ].metaldetector )
|
||||
if( Item[ usItem ].usItemClass == IC_MISC && ItemIsMetalDetector(usItem) )
|
||||
return INV_ITEM_TYPE_METALDETECTOR;
|
||||
|
||||
return INV_ITEM_TYPE_UNKNOWN;
|
||||
|
||||
Reference in New Issue
Block a user