Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions Tactical/Interface Items.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -643,13 +643,29 @@ void popupCallbackItem(INT16 itemId){
i++;p++;
}

OBJECTTYPE pObjTmp;
static OBJECTTYPE pObjTmp;
pObjTmp.initialize();

if( bestStack->RemoveObjectAtIndex(leastDamagedIndex, &pObjTmp) ){
gpItemPointer = &pObjTmp; // pick up the object (or stack)
DoAttachment((UINT8)gubPopupStatusIndex, guiPopupItemPos); // try to attach it
//gpItemPointer = NULL; // dont drop it!

// If attaching failed, change mouse cursor to item as we're still holding it
if ( gpItemPointer->exists() ) {
// Set mouse
guiExternVo = GetInterfaceGraphicForItem(&(Item[gpItemPointer->usItem]));
gusExternVoSubIndex = Item[gpItemPointer->usItem].ubGraphicNum;

MSYS_ChangeRegionCursor(&gMPanelRegion, EXTERN_CURSOR);
MSYS_SetCurrentCursor(EXTERN_CURSOR);
fMapInventoryItem = TRUE;
fTeamPanelDirty = TRUE;

//Dirty interface
fInterfacePanelDirty = DIRTYLEVEL2;

UpdateItemHatches();
}

gItemDescAttachmentPopups[giActiveAttachmentPopup]->hide();
RenderItemDescriptionBox();
Expand Down
Loading