mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Fix: Inventory popups for LBE slots didn't work properly. LBE slots are supposed to return a pocket type of -1 because they are no pockets. Instead they returned 2 (Knife pocket).
Fix: Inventory slots didn't show possible item amount anymore since r7600. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7619 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -1767,7 +1767,8 @@ INT16 pocketTypeInSlot(SOLDIERTYPE *pSoldier, INT16 sPocket){
|
||||
: LoadBearingEquipment[Item[pSoldier->inv[icLBE[sPocket]].usItem].ubClassIndex].lbePocketIndex[icPocket[sPocket]];
|
||||
|
||||
break;
|
||||
case LBE_POCKET:
|
||||
// silversurfer: LBE slots are NOT pockets!
|
||||
/* case LBE_POCKET:
|
||||
if ( sPocket == VESTPOCKPOS )
|
||||
lbePocket = 0;
|
||||
else if ( sPocket == LTHIGHPOCKPOS )
|
||||
@@ -1779,11 +1780,13 @@ INT16 pocketTypeInSlot(SOLDIERTYPE *pSoldier, INT16 sPocket){
|
||||
else if ( sPocket == BPACKPOCKPOS )
|
||||
lbePocket = 4;
|
||||
|
||||
break;*/
|
||||
|
||||
case OTHER_POCKET:
|
||||
|
||||
if ( sPocket == GUNSLINGPOCKPOS ) // Gun Sling
|
||||
lbePocket = 1;
|
||||
else
|
||||
else // Knife
|
||||
lbePocket = 2;
|
||||
break;
|
||||
|
||||
@@ -2332,7 +2335,7 @@ POPUP * createPopupForPocket( SOLDIERTYPE *pSoldier, INT16 sPocket ){
|
||||
|
||||
INT16 sX, sY;
|
||||
// get pocket type under cursor
|
||||
INT16 lbePocket = pocketTypeInSlot(pSoldier, sPocket);
|
||||
//INT16 lbePocket = pocketTypeInSlot(pSoldier, sPocket);
|
||||
/*
|
||||
if ( lbePocket != -1 ) {
|
||||
*/
|
||||
@@ -2702,7 +2705,7 @@ void INVRenderINVPanelItem( SOLDIERTYPE *pSoldier, INT16 sPocket, UINT8 fDirtyLe
|
||||
}
|
||||
else if ( !gfSMDisableForItems )
|
||||
{
|
||||
if ( gpItemPointer != NULL && !CanItemFitInPosition( pSoldier, gpItemPointer, (INT8)sPocket, FALSE ) )
|
||||
if ( gpItemPointer != NULL )
|
||||
{
|
||||
// CHRISL: Display pocket capacity if we're holding something in the cursor
|
||||
if ( UsingNewInventorySystem( ) )
|
||||
@@ -2717,15 +2720,15 @@ void INVRenderINVPanelItem( SOLDIERTYPE *pSoldier, INT16 sPocket, UINT8 fDirtyLe
|
||||
}
|
||||
|
||||
// CHRISL: Change whether we hatch a pocket to be dependant on the current item
|
||||
if ( (!UsingNewAttachmentSystem( ) && !ValidAttachment( gpItemPointer->usItem, pObject )) ||
|
||||
if ( CanItemFitInPosition( pSoldier, gpItemPointer, (INT8)sPocket, FALSE ) )
|
||||
{
|
||||
fHatchItOut = FALSE;
|
||||
}
|
||||
else if (!UsingNewAttachmentSystem( ) && !ValidAttachment( gpItemPointer->usItem, pObject ) ||
|
||||
(UsingNewAttachmentSystem( ) && !ValidItemAttachmentSlot( pObject, gpItemPointer->usItem, FALSE, FALSE )) )
|
||||
{
|
||||
fHatchItOut = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
fHatchItOut = FALSE;
|
||||
}
|
||||
}
|
||||
else if ( pObject->exists( ) )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user