File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -316,16 +316,34 @@ void CTFBuffItem::CreateBanner()
316316 if ( !pPlayer || !pPlayer->IsAlive () )
317317 return ;
318318
319+ #ifdef BDSBASE
320+ int iBuffType = GetBuffType ();
321+ // Prevent Crashes From Invalid Buff Types
322+ if (iBuffType > ARRAYSIZE (BannerModels) || iBuffType <= 0 )
323+ {
324+ DevMsg (" Invalid buff type %d, Not Creating Banner\n " , iBuffType);
325+ return ;
326+ }
327+ #endif
328+
319329 C_TFBuffBanner* pBanner = new C_TFBuffBanner;
320330 if ( !pBanner )
321331 return ;
322332
323333 // Assert( iBuffType > 0 );
324334 // Assert( iBuffType <= ARRAYSIZE(BannerModels) );
325335 pBanner->m_nSkin = 0 ;
336+ #ifdef BDSBASE
337+ pBanner->InitializeAsClientEntity (BannerModels[iBuffType - 1 ], RENDER_GROUP_OPAQUE_ENTITY);
338+ #else
326339 pBanner->InitializeAsClientEntity ( BannerModels[GetBuffType ()-1 ], RENDER_GROUP_OPAQUE_ENTITY );
340+ #endif
327341 pBanner->SetBuffItem ( this );
342+ #ifdef BDSBASE
343+ pBanner->SetBuffType (iBuffType);
344+ #else
328345 pBanner->SetBuffType ( GetBuffType () );
346+ #endif
329347 pBanner->ForceClientSideAnimationOn ();
330348 SetBanner ( pBanner );
331349 int iSpine = pPlayer->LookupBone ( " bip_spine_3" );
You can’t perform that action at this time.
0 commit comments