@@ -2785,11 +2785,11 @@ struct rbatch_t
27852785// ----------------------------------------
27862786*/
27872787
2788- inline int FindModel ( const CUtlVector< rmodel_t > &list, const model_t * pModel )
2788+ inline int FindModel ( const rmodel_t * pList, int listCount, const model_t * pModel )
27892789{
2790- for ( int j = list. Count () ; --j >= 0 ; )
2790+ for ( int j = listCount ; --j >= 0 ; )
27912791 {
2792- if ( list [j].pModel == pModel )
2792+ if ( pList [j].pModel == pModel )
27932793 return j;
27942794 }
27952795 return -1 ;
@@ -2806,13 +2806,13 @@ int CModelRender::DrawStaticPropArrayFast( StaticPropRenderInfo_t *pProps, int c
28062806#ifndef SWDS
28072807 MDLCACHE_CRITICAL_SECTION_ ( g_pMDLCache );
28082808 CMatRenderContextPtr pRenderContext ( materials );
2809- const int MAX_OBJECTS = 1024 ;
2809+ const int MAX_OBJECTS = 2048 ;
28102810 CUtlSortVector<robject_t , CRobjectLess> objectList (0 , MAX_OBJECTS);
2811- CUtlVector <rmodel_t > modelList ( 0 , 256 ) ;
2812- CUtlVector <short > lightObjects ( 0 , 256 ) ;
2813- CUtlVector <short > shadowObjects ( 0 , 64 ) ;
2814- CUtlVector <rdecalmodel_t > decalObjects ( 0 , 64 ) ;
2815- CUtlVector <LightingState_t> lightStates ( 0 , 256 ) ;
2811+ CUtlVectorFixedGrowable <rmodel_t , 256 > modelList;
2812+ CUtlVectorFixedGrowable <short , 256 > lightObjects;
2813+ CUtlVectorFixedGrowable <short , 64 > shadowObjects;
2814+ CUtlVectorFixedGrowable <rdecalmodel_t , 64 > decalObjects;
2815+ CUtlVectorFixedGrowable <LightingState_t, 256 > lightStates;
28162816 bool bForceCubemap = r_showenvcubemap.GetBool ();
28172817 int drawnCount = 0 ;
28182818 int forcedLodSetting = r_lod.GetInt ();
@@ -2826,7 +2826,7 @@ int CModelRender::DrawStaticPropArrayFast( StaticPropRenderInfo_t *pProps, int c
28262826 {
28272827 drawnCount++;
28282828 // UNDONE: This is a perf hit in some scenes! Use a hash?
2829- int modelIndex = FindModel ( modelList, pProps[i].pModel );
2829+ int modelIndex = FindModel ( modelList. Base (), modelList. Count () , pProps[i].pModel );
28302830 if ( modelIndex < 0 )
28312831 {
28322832 modelIndex = modelList.AddToTail ();
0 commit comments