mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
Fixed a CTD that occurs when closing sector inventory while the item description window is open.
Added a new ALLOW_SECTOR_DESCRIPTION_WINDOW flag to the ja2_options.ini that allows players to turn off the stack popup and item description functionality for the sector inventory panel. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2063 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -582,6 +582,13 @@ void CreateDestroyMapInventoryPoolButtons( BOOLEAN fExitFromMapScreen )
|
||||
fTeamPanelDirty = TRUE;
|
||||
fCharacterInfoPanelDirty = TRUE;
|
||||
|
||||
//CHRISL: close stack popup and item description windows
|
||||
DeleteItemStackPopup();
|
||||
if ( gfInItemDescBox )
|
||||
{
|
||||
DeleteItemDescriptionBox();
|
||||
}
|
||||
|
||||
//DEF: added to remove the 'item blip' from staying on the radar map
|
||||
iCurrentlyHighLightedItem = -1;
|
||||
|
||||
@@ -824,27 +831,33 @@ void MapInvenPoolSlots(MOUSE_REGION * pRegion, INT32 iReason )
|
||||
|
||||
if( ( iReason & MSYS_CALLBACK_REASON_RBUTTON_UP ) )
|
||||
{
|
||||
//CHRISL: Make it possible to right click and pull up stack popup and/or item description boxes
|
||||
WORLDITEM * twItem = &(pInventoryPoolList[ ( iCurrentInventoryPoolPage * MAP_INVENTORY_POOL_SLOT_COUNT ) + iCounter ]);
|
||||
if ( !InSectorStackPopup( ) && !InItemStackPopup( ) && !InItemDescriptionBox( ) && !InKeyRingPopup( ) && twItem->object.exists() == true && (bSelectedInfoChar != -1 && gCharactersList[bSelectedInfoChar].fValid))
|
||||
if(gGameExternalOptions.fSectorDesc == TRUE)
|
||||
{
|
||||
if(ItemSlotLimit( &twItem->object, STACK_SIZE_LIMIT ) == 1)
|
||||
//CHRISL: Make it possible to right click and pull up stack popup and/or item description boxes
|
||||
WORLDITEM * twItem = &(pInventoryPoolList[ ( iCurrentInventoryPoolPage * MAP_INVENTORY_POOL_SLOT_COUNT ) + iCounter ]);
|
||||
if ( !InSectorStackPopup( ) && !InItemStackPopup( ) && !InItemDescriptionBox( ) && !InKeyRingPopup( ) && twItem->object.exists() == true && (bSelectedInfoChar != -1 && gCharactersList[bSelectedInfoChar].fValid))
|
||||
{
|
||||
fShowInventoryFlag = TRUE;
|
||||
MAPInternalInitItemDescriptionBox( &twItem->object, 0, MercPtrs[gCharactersList[bSelectedInfoChar].usSolID] );
|
||||
}
|
||||
else if(gpItemPointer == NULL || gpItemPointer->usItem == twItem->object.usItem || ValidAttachment(gpItemPointer->usItem, twItem->object.usItem) == TRUE || ValidAmmoType(twItem->object.usItem, gpItemPointer->usItem) == TRUE)
|
||||
{
|
||||
InitSectorStackPopup( MercPtrs[gCharactersList[bSelectedInfoChar].usSolID], twItem, iCounter, 0, INV_REGION_Y, 261, ( SCREEN_HEIGHT - PLAYER_INFO_Y ) );
|
||||
fTeamPanelDirty=TRUE;
|
||||
fInterfacePanelDirty = DIRTYLEVEL2;
|
||||
if(ItemSlotLimit( &twItem->object, STACK_SIZE_LIMIT ) == 1)
|
||||
{
|
||||
fShowInventoryFlag = TRUE;
|
||||
MAPInternalInitItemDescriptionBox( &twItem->object, 0, MercPtrs[gCharactersList[bSelectedInfoChar].usSolID] );
|
||||
}
|
||||
else if(gpItemPointer == NULL || gpItemPointer->usItem == twItem->object.usItem || ValidAttachment(gpItemPointer->usItem, twItem->object.usItem) == TRUE || ValidAmmoType(twItem->object.usItem, gpItemPointer->usItem) == TRUE)
|
||||
{
|
||||
InitSectorStackPopup( MercPtrs[gCharactersList[bSelectedInfoChar].usSolID], twItem, iCounter, 0, INV_REGION_Y, 261, ( SCREEN_HEIGHT - PLAYER_INFO_Y ) );
|
||||
fTeamPanelDirty=TRUE;
|
||||
fInterfacePanelDirty = DIRTYLEVEL2;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( gpItemPointer == NULL )
|
||||
else
|
||||
{
|
||||
//fShowMapInventoryPool = FALSE;
|
||||
if ( gpItemPointer == NULL )
|
||||
{
|
||||
//fShowMapInventoryPool = FALSE;
|
||||
}
|
||||
// else do nothing
|
||||
}
|
||||
// else do nothing
|
||||
}
|
||||
else if( iReason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user