If a container is destroyed by gunfire or vehicle collision, don't destroy the contents, reveal them instead.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9087 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2021-06-18 18:43:24 +00:00
parent a288b2e60c
commit 7a866c5f29
4 changed files with 37 additions and 7 deletions
+22
View File
@@ -3500,6 +3500,28 @@ void RemoveAllUnburiedItems( INT32 sGridNo, UINT8 ubLevel )
}
}
void RevealAllUnburiedItems( INT32 sGridNo, UINT8 ubLevel )
{
ITEM_POOL *pItemPool;
// Check for and existing pool on the object layer
GetItemPool( sGridNo, &pItemPool, ubLevel );
while ( pItemPool )
{
if ( gWorldItems[pItemPool->iItemIndex].bVisible != BURIED )
{
gWorldItems[pItemPool->iItemIndex].bVisible = VISIBLE;
gWorldItems[pItemPool->iItemIndex].bRenderZHeightAboveLevel = 0;
gWorldItems[pItemPool->iItemIndex].ubNonExistChance = 0;
gWorldItems[pItemPool->iItemIndex].usFlags &= ( ~WORLD_ITEM_DONTRENDER );
}
pItemPool = pItemPool->pNext;
}
NotifySoldiersToLookforItems();
}
void LoopLevelNodeForShowThroughFlag( LEVELNODE *pNode, INT32 sGridNo, UINT8 ubLevel )
{