Fixed a bug that would cause a freeze while in OldInv mode at the very start of the game if you didn't open the tactical inventory panel before trying to open the strategic inventory panel.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1977 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
ChrisL
2008-04-02 21:34:11 +00:00
parent fbf63c8af0
commit bbc4447ab6
3 changed files with 13 additions and 4 deletions
+10 -2
View File
@@ -1039,9 +1039,17 @@ void InitInventoryVehicle(INV_REGION_DESC *pRegionDesc, MOUSE_CALLBACK INVMoveCa
}
}
// CHRISL: Function to recreate inventory mouse regions
void InitInventorySoldier(INV_REGION_DESC *pRegionDesc, MOUSE_CALLBACK INVMoveCallback, MOUSE_CALLBACK INVClickCallback, BOOLEAN fSetHighestPrioity)
void InitInventorySoldier(INV_REGION_DESC *pRegionDesc, MOUSE_CALLBACK INVMoveCallback, MOUSE_CALLBACK INVClickCallback, BOOLEAN fSetHighestPrioity, BOOLEAN fNIVmode)
{
InitInventoryNew();
if(fNIVmode == TRUE)
InitInventoryNew();
else
{
if(gSMInvData[0].sHeight == 0 && gSMInvData[0].sWidth == 0) //base values havn't been set yet
InitInventoryOld();
else
return;
}
for(int cnt=INV_START_POS; cnt<NUM_INV_SLOTS; cnt++)
{
gSMInvData[ cnt ].sX = pRegionDesc[cnt].sX;