mirror of
https://github.com/1dot13/source.git
synced 2026-08-19 14:20:30 +02:00
BUGFIX 536 - Fixed it so we don't lose items when attempting to hand an invalid item to an NPC.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4516 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user