diff --git a/Tactical/Handle Items.cpp b/Tactical/Handle Items.cpp index 360a6e17..4f4e59e6 100644 --- a/Tactical/Handle Items.cpp +++ b/Tactical/Handle Items.cpp @@ -4206,12 +4206,15 @@ void SoldierGiveItemFromAnimation( SOLDIERTYPE *pSoldier ) } else { + //CHRISL: The item we're handing over potentially came from an inventory slot but was placed into the cursor. So why are we deleting any remaining + // items left in the inventory slot we started from. When we moved the item from a stack into the cursor, we created a seperate stack and it's this + // new stack we should be exclusively working with. Not the stack we took items from. // Erase! - if ( bInvPos != NO_SLOT ) - { - DeleteObj(&pSoldier->inv[ bInvPos ]); - DirtyMercPanelInterface( pSoldier, DIRTYLEVEL2 ); - } +// if ( bInvPos != NO_SLOT ) +// { +// DeleteObj(&pSoldier->inv[ bInvPos ]); +// DirtyMercPanelInterface( pSoldier, DIRTYLEVEL2 ); +// } // Now intiate conv InitiateConversation( pTSoldier, pSoldier, APPROACH_GIVINGITEM, (INT32)&gTempObject ); diff --git a/Tactical/Interface Items.cpp b/Tactical/Interface Items.cpp index 1f4c05a5..ee283d79 100644 --- a/Tactical/Interface Items.cpp +++ b/Tactical/Interface Items.cpp @@ -6353,15 +6353,16 @@ BOOLEAN HandleItemPointerClick( INT32 usMapPos ) sAPCost = GetAPsToGiveItem( gpItemPointerSoldier, usMapPos ); } + //CHRISL: This doesn't make sense to me. If we take an item out of a stack and then click on something, why would we first attempt to put the item + // back in the stack we took it from. The item in the cursor should be recognized as a seperate stack at this point. // Place it back in our hands! - gTempObject = *gpItemPointer; - if ( gbItemPointerSrcSlot != NO_SLOT ) - { - PlaceObject( gpItemPointerSoldier, gbItemPointerSrcSlot, gpItemPointer ); - fInterfacePanelDirty = DIRTYLEVEL2; - } +// if ( gbItemPointerSrcSlot != NO_SLOT ) +// { +// PlaceObject( gpItemPointerSoldier, gbItemPointerSrcSlot, gpItemPointer ); +// fInterfacePanelDirty = DIRTYLEVEL2; +// } /* //if the user just clicked on an arms dealer if( IsMercADealer( MercPtrs[ ubSoldierID ]->ubProfile ) )