mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +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:
@@ -1459,14 +1459,13 @@ int CompareItemsForSorting( UINT16 usItem1Index, UINT16 usItem2Index, UINT16 ubI
|
||||
|
||||
UINT8 GetDealerItemCategoryNumber( UINT16 usItemIndex )
|
||||
{
|
||||
UINT32 uiItemClass;
|
||||
UINT32 uiItemClass;
|
||||
UINT8 ubWeaponClass;
|
||||
UINT8 ubCategory = 0;
|
||||
|
||||
|
||||
uiItemClass = Item[ usItemIndex ].usItemClass;
|
||||
|
||||
if ( usItemIndex < MAXITEMS && IsWeapon(usItemIndex) )
|
||||
if ( usItemIndex < gMAXITEMS_READ && IsWeapon( usItemIndex ) )
|
||||
{
|
||||
ubWeaponClass = 0;// Madd: commented out so we can sort guns by name instead ... Weapon[ usItemIndex ].ubWeaponClass;
|
||||
}
|
||||
@@ -1476,7 +1475,6 @@ UINT8 GetDealerItemCategoryNumber( UINT16 usItemIndex )
|
||||
ubWeaponClass = 0;
|
||||
}
|
||||
|
||||
|
||||
ubCategory = 0;
|
||||
|
||||
// search table until end-of-list marker is encountered
|
||||
@@ -1502,7 +1500,7 @@ UINT8 GetDealerItemCategoryNumber( UINT16 usItemIndex )
|
||||
}
|
||||
|
||||
// check vs. next category in the list
|
||||
ubCategory++;
|
||||
++ubCategory;
|
||||
}
|
||||
|
||||
// WANNE: commented the assert out, because we always get the assertion in debug mode!
|
||||
|
||||
Reference in New Issue
Block a user