diff --git a/GameVersion.cpp b/GameVersion.cpp index a183eff8..59818231 100644 --- a/GameVersion.cpp +++ b/GameVersion.cpp @@ -23,7 +23,7 @@ CHAR16 zVersionLabel[256] = { L"Beta v. 0.98" }; #else //RELEASE BUILD VERSION - CHAR16 zVersionLabel[256] = { L"Release v1.13.1052" }; + CHAR16 zVersionLabel[256] = { L"Release v1.13.1078L" }; #endif diff --git a/Strategic/Strategic Event Handler.cpp b/Strategic/Strategic Event Handler.cpp index fe1c5707..83f4f149 100644 --- a/Strategic/Strategic Event Handler.cpp +++ b/Strategic/Strategic Event Handler.cpp @@ -474,7 +474,7 @@ void HandleDelayedItemsArrival( UINT32 uiReason ) { // sector is loaded! // just move the hidden item pool - MoveItemPools( sStartGridNo, BOBBYR_SHIPPING_DEST_GRIDNO ); + MoveItemPools( sStartGridNo, BOBBYR_SHIPPING_DEST_GRIDNO, 0, 0 ); } else { diff --git a/Tactical/Handle Items.cpp b/Tactical/Handle Items.cpp index 9be7c8b0..2ca9c5b7 100644 --- a/Tactical/Handle Items.cpp +++ b/Tactical/Handle Items.cpp @@ -3050,18 +3050,19 @@ BOOLEAN RemoveItemFromPool( INT16 sGridNo, INT32 iItemIndex, UINT8 ubLevel ) return( FALSE ); } -BOOLEAN MoveItemPools( INT16 sStartPos, INT16 sEndPos ) +BOOLEAN MoveItemPools( INT16 sStartPos, INT16 sEndPos, INT8 bStartLevel, INT8 bEndLevel ) { // note, only works between locations on the ground ITEM_POOL *pItemPool; WORLDITEM TempWorldItem; // While there is an existing pool - while( GetItemPool( sStartPos, &pItemPool, 0 ) ) + while( GetItemPool( sStartPos, &pItemPool, bStartLevel ) ) { memcpy( &TempWorldItem, &(gWorldItems[ pItemPool->iItemIndex ]), sizeof( WORLDITEM ) ); - RemoveItemFromPool( sStartPos, pItemPool->iItemIndex, 0 ); - AddItemToPool( sEndPos, &(TempWorldItem.o), -1, TempWorldItem.ubLevel, TempWorldItem.usFlags, TempWorldItem.bRenderZHeightAboveLevel ); + RemoveItemFromPool( sStartPos, pItemPool->iItemIndex, bStartLevel ); + //AddItemToPool( sEndPos, &(TempWorldItem.o), -1, TempWorldItem.ubLevel, TempWorldItem.usFlags, TempWorldItem.bRenderZHeightAboveLevel ); + AddItemToPool( sEndPos, &(TempWorldItem.o), -1, bEndLevel, TempWorldItem.usFlags, TempWorldItem.bRenderZHeightAboveLevel ); } return( TRUE ); } diff --git a/Tactical/Handle Items.h b/Tactical/Handle Items.h index 2846b314..4df1dcbc 100644 --- a/Tactical/Handle Items.h +++ b/Tactical/Handle Items.h @@ -110,7 +110,7 @@ BOOLEAN GetItemPool( UINT16 usMapPos, ITEM_POOL **ppItemPool, UINT8 ubLevel ); BOOLEAN DrawItemPoolList( ITEM_POOL *pItemPool, INT16 sGridNo, UINT8 bCommand, INT8 bZLevel, INT16 sXPos, INT16 sYPos ); BOOLEAN RemoveItemFromPool( INT16 sGridNo, INT32 iItemIndex, UINT8 ubLevel ); BOOLEAN ItemExistsAtLocation( INT16 sGridNo, INT32 iItemIndex, UINT8 ubLevel ); -BOOLEAN MoveItemPools( INT16 sStartPos, INT16 sEndPos ); +BOOLEAN MoveItemPools( INT16 sStartPos, INT16 sEndPos, INT8 bStartLevel, INT8 bEndLevel ); void SetItemPoolLocator( ITEM_POOL *pItemPool ); void SetItemPoolLocatorWithCallback( ITEM_POOL *pItemPool, ITEM_POOL_LOCATOR_HOOK Callback ); diff --git a/Tactical/Turn Based Input.cpp b/Tactical/Turn Based Input.cpp index dc1c521d..205f4e3a 100644 --- a/Tactical/Turn Based Input.cpp +++ b/Tactical/Turn Based Input.cpp @@ -2579,7 +2579,7 @@ void GetKeyboardInput( UINT32 *puiNewEvent ) for ( UINT32 uiLoop = 0; uiLoop < guiNumWorldItems; uiLoop++ ) //for all items in sector { - if ( (gWorldItems[ uiLoop ].fExists) && (gWorldItems[ uiLoop ].usFlags & WORLD_ITEM_REACHABLE) )//item exists and is reachable + if ( (gWorldItems[ uiLoop ].bVisible == TRUE) && (gWorldItems[ uiLoop ].fExists) && (gWorldItems[ uiLoop ].usFlags & WORLD_ITEM_REACHABLE) && !(gWorldItems[ uiLoop ].usFlags & WORLD_ITEM_ARMED_BOMB) )//item exists, is reachable, is visible and is not trapped { if (( Item[ gWorldItems[ uiLoop ].o.usItem ].usItemClass == IC_GUN ) && (gGameExternalOptions.gfShiftFUnloadWeapons == TRUE) )//item is a gun and unloading is allowed { @@ -2980,12 +2980,13 @@ void GetKeyboardInput( UINT32 *puiNewEvent ) for ( UINT32 uiLoop = 0; uiLoop < guiNumWorldItems; uiLoop++ ) //for all items in sector { - if ( (gWorldItems[ uiLoop ].fExists) && (gWorldItems[ uiLoop ].usFlags & WORLD_ITEM_REACHABLE) && (gWorldItems[ uiLoop ].sGridNo != pSoldier->sGridNo) )//item exists and is reachable + if ( (gWorldItems[ uiLoop ].bVisible == TRUE) && (gWorldItems[ uiLoop ].fExists) && (gWorldItems[ uiLoop ].usFlags & WORLD_ITEM_REACHABLE) && !(gWorldItems[ uiLoop ].usFlags & WORLD_ITEM_ARMED_BOMB) && (gWorldItems[ uiLoop ].sGridNo != pSoldier->sGridNo) )//item exists and is reachable and is not already on soldiers tile { - MoveItemPools(gWorldItems[ uiLoop ].sGridNo, pSoldier->sGridNo); - NotifySoldiersToLookforItems( ); + MoveItemPools(gWorldItems[ uiLoop ].sGridNo, pSoldier->sGridNo, gWorldItems[ uiLoop ].ubLevel, pSoldier->bLevel); } } + + NotifySoldiersToLookforItems( ); } } } @@ -3304,7 +3305,7 @@ void GetKeyboardInput( UINT32 *puiNewEvent ) // Search for ammo in sector for ( UINT32 uiLoop = 0; uiLoop < guiNumWorldItems; uiLoop++ ) { - if ( (gWorldItems[ uiLoop ].fExists) && (gWorldItems[ uiLoop ].usFlags & WORLD_ITEM_REACHABLE) )//item exists + if ( (gWorldItems[ uiLoop ].bVisible == TRUE) && (gWorldItems[ uiLoop ].fExists) && (gWorldItems[ uiLoop ].usFlags & WORLD_ITEM_REACHABLE) && !(gWorldItems[ uiLoop ].usFlags & WORLD_ITEM_ARMED_BOMB) )//item exists, is reachable, is visible and is not trapped { if ( ( Item[ gWorldItems[ uiLoop ].o.usItem ].usItemClass & IC_AMMO ) ) // the item is ammo { @@ -3449,7 +3450,7 @@ void GetKeyboardInput( UINT32 *puiNewEvent ) for ( UINT32 uiLoop = 0; uiLoop < guiNumWorldItems; uiLoop++ ) { - if ( ( gWorldItems[ uiLoop ].fExists) && (gWorldItems[ uiLoop ].usFlags & WORLD_ITEM_REACHABLE) )//item exists and is reachable + if ( (gWorldItems[ uiLoop ].bVisible == TRUE) && (gWorldItems[ uiLoop ].fExists) && (gWorldItems[ uiLoop ].usFlags & WORLD_ITEM_REACHABLE) && !(gWorldItems[ uiLoop ].usFlags & WORLD_ITEM_ARMED_BOMB) )//item exists, is reachable, is visible and is not trapped { //find out how many items can be put in a big slot INT8 ubSlotLimit = ItemSlotLimit( gWorldItems[ uiLoop ].o.usItem, BIGPOCK1POS );