mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
If the itemlist is huge and one uses New Inventory System, New Attachment System and a lot of MOLLE items, there is a noticable slowdown if inventory is open in tactical. I cleaned up code to ease that somewhat, but the problem will likely persist.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7600 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+5
-13
@@ -2519,7 +2519,7 @@ void SetFirstLastPagesForNew( UINT32 uiClassMask, INT32 iFilter, INT32 iSubFilte
|
||||
gubCurPage = 0;
|
||||
|
||||
//First loop through to get the first and last index indexs
|
||||
for(i=0; i<MAXITEMS; i++)
|
||||
for(i=0; i<MAXITEMS; ++i)
|
||||
{
|
||||
//If we have some of the inventory on hand
|
||||
if( LaptopSaveInfo.BobbyRayInventory[ i ].ubQtyOnHand != 0 )
|
||||
@@ -2614,7 +2614,7 @@ void SetFirstLastPagesForNew( UINT32 uiClassMask, INT32 iFilter, INT32 iSubFilte
|
||||
//Loops through Bobby Rays Used Inventory to find the first and last index
|
||||
void SetFirstLastPagesForUsed(INT32 iFilter)
|
||||
{
|
||||
UINT16 i;
|
||||
UINT16 i;
|
||||
INT16 sFirst = -1;
|
||||
INT16 sLast = -1;
|
||||
UINT16 ubNumItems=0;
|
||||
@@ -2623,9 +2623,8 @@ void SetFirstLastPagesForUsed(INT32 iFilter)
|
||||
gubCurPage = 0;
|
||||
BOOLEAN bCntNumItems = FALSE;
|
||||
|
||||
|
||||
//First loop through to get the first and last index indexs
|
||||
for(i=0; i<MAXITEMS; i++)
|
||||
for(i=0; i<MAXITEMS; ++i)
|
||||
{
|
||||
//If we have some of the inventory on hand
|
||||
if( LaptopSaveInfo.BobbyRayUsedInventory[ i ].ubQtyOnHand != 0 )
|
||||
@@ -3594,20 +3593,13 @@ void CalcFirstIndexForPage( STORE_INVENTORY *pInv, UINT32 uiItemClass )
|
||||
|
||||
BOOLEAN IsAmmoMatchinWeaponType(UINT16 usItemIndex, UINT8 ubWeaponType)
|
||||
{
|
||||
// usItemIndex == Ammo
|
||||
|
||||
BOOLEAN bRetValue = FALSE;
|
||||
|
||||
UINT32 i;
|
||||
|
||||
for (i = 0; i < MAXITEMS; i++)
|
||||
|
||||
for ( UINT32 i = 0; i < gMAXITEMS_READ; ++i )
|
||||
{
|
||||
if (Item[i].usItemClass != IC_GUN )
|
||||
continue;
|
||||
|
||||
if (Item[i].usItemClass == 0)
|
||||
break; // out of items
|
||||
|
||||
// We found the Weapon that uses this Ammo
|
||||
if (Magazine[ Item[ usItemIndex ].ubClassIndex ].ubCalibre == Weapon[i].ubCalibre)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user