comparison Party.cpp @ 1898:dd9d4b7c1199

Fixing a small bug in Party::AddItemToParty + removing unreachable return
author Grumpy7
date Sun, 20 Oct 2013 23:12:09 -0700
parents 351b4ff10ac1
children c1c74df0a33e
comparison
equal deleted inserted replaced
1897:436553b0603c 1898:dd9d4b7c1199
1118 if ( v5 ) 1118 if ( v5 )
1119 { 1119 {
1120 v7 = pIcons_LOD->LoadTexturePtr(v5, TEXTURE_16BIT_PALETTE); 1120 v7 = pIcons_LOD->LoadTexturePtr(v5, TEXTURE_16BIT_PALETTE);
1121 v21 = areWeLoadingTexture; 1121 v21 = areWeLoadingTexture;
1122 v8 = 0; 1122 v8 = 0;
1123 int startId = uActiveCharacter >= 0 ? uActiveCharacter - 1 : 0;
1124 for (int i = 0; i < 4; i++) 1123 for (int i = 0; i < 4; i++)
1125 { 1124 {
1126 v9 = &pPlayers[(startId + i) % 4]; //start with current active player, then cycle right if item won't fit 1125 v9 = &pPlayers[(uActiveCharacter + i) % 4]; //start with current active player, then cycle right if item won't fit
1127 v10 = v9->AddItem(-1, pItem->uItemID); 1126 v10 = v9->AddItem(-1, pItem->uItemID);
1128 if ( v10 ) 1127 if ( v10 )
1129 { 1128 {
1130 memcpy(&v9->pInventoryItemList[v10-1], pItem, 0x24u); 1129 memcpy(&v9->pInventoryItemList[v10-1], pItem, 0x24u);
1131 pItem->Reset(); 1130 pItem->Reset();