mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
Merged revision(s) 6826-6828 from branches/ja2_source_official_2014:
- Minor code improvements and cleanup - Fix from r6775 is no longer necessary. - Code improvement: Instead of calling inv.size() repeatedly, just call it once and remember that value git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6829 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -1585,12 +1585,13 @@ BOOLEAN DisplayMercsInventory(UINT8 ubMercID)
|
||||
|
||||
//tais: disable Weaponbox Mouseregions to stop crashing when changing kit selection and hovering over item
|
||||
//tooltips for weaponbox
|
||||
for(i=0;i<WEAPONBOX_TOTAL_ITEMS;i++)
|
||||
for(i=0;i<WEAPONBOX_TOTAL_ITEMS; ++i)
|
||||
{
|
||||
MSYS_DisableRegion(&gWeaponboxFasthelpRegion[i]);
|
||||
}
|
||||
|
||||
for(i=0; i<gMercProfiles[ubMercID].inv.size(); i++)
|
||||
UINT8 invsize = gMercProfiles[ubMercID].inv.size();
|
||||
for(i=0; i<invsize; ++i)
|
||||
{
|
||||
usItem = gMercProfiles[ubMercID].inv[ i ];
|
||||
|
||||
@@ -1665,7 +1666,8 @@ BOOLEAN DisplayMercsInventory(UINT8 ubMercID)
|
||||
PosX = WEAPONBOX_X+3; // + 3 ( 1 to take care of the shadow, +2 to get past the weapon box border )
|
||||
PosY = WEAPONBOX_Y;
|
||||
|
||||
for(i=0; i<gMercProfiles[ubMercID].inv.size(); i++)
|
||||
UINT8 invsize = gMercProfiles[ubMercID].inv.size();
|
||||
for(i=0; i<invsize; ++i)
|
||||
{
|
||||
usItem = gMercProfiles[ubMercID].inv[ i ];
|
||||
|
||||
@@ -5930,7 +5932,8 @@ void WeaponKitSelectionUpdate(UINT8 selectedInventory = 0)
|
||||
gMercProfiles[gbCurrentSoldier].bMainGunAttractiveness = -1;
|
||||
gMercProfiles[gbCurrentSoldier].bArmourAttractiveness = -1;
|
||||
|
||||
for ( uiLoop = 0; uiLoop < gMercProfiles[gbCurrentSoldier].inv.size(); uiLoop++ )
|
||||
UINT32 invsize = gMercProfiles[ gbCurrentSoldier ].inv.size();
|
||||
for ( uiLoop = 0; uiLoop < invsize; ++uiLoop )
|
||||
{
|
||||
usItem = gMercProfiles[gbCurrentSoldier].inv[ uiLoop ];
|
||||
|
||||
@@ -5959,7 +5962,8 @@ void WeaponKitSelectionUpdate(UINT8 selectedInventory = 0)
|
||||
else
|
||||
{
|
||||
UINT16 tempGearCost = 0;
|
||||
for ( uiLoop = 0; uiLoop< gMercProfiles[ gbCurrentSoldier ].inv.size(); uiLoop++ )
|
||||
UINT32 invsize = gMercProfiles[ gbCurrentSoldier ].inv.size();
|
||||
for ( uiLoop = 0; uiLoop< invsize; ++uiLoop )
|
||||
{
|
||||
if ( gMercProfiles[ gbCurrentSoldier ].inv[ uiLoop ] != NOTHING )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user