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()
316
316
if ( !pPlayer || !pPlayer->IsAlive () )
317
317
return ;
318
318
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
+
319
329
C_TFBuffBanner* pBanner = new C_TFBuffBanner;
320
330
if ( !pBanner )
321
331
return ;
322
332
323
333
// Assert( iBuffType > 0 );
324
334
// Assert( iBuffType <= ARRAYSIZE(BannerModels) );
325
335
pBanner->m_nSkin = 0 ;
336
+ #ifdef BDSBASE
337
+ pBanner->InitializeAsClientEntity (BannerModels[iBuffType - 1 ], RENDER_GROUP_OPAQUE_ENTITY);
338
+ #else
326
339
pBanner->InitializeAsClientEntity ( BannerModels[GetBuffType ()-1 ], RENDER_GROUP_OPAQUE_ENTITY );
340
+ #endif
327
341
pBanner->SetBuffItem ( this );
342
+ #ifdef BDSBASE
343
+ pBanner->SetBuffType (iBuffType);
344
+ #else
328
345
pBanner->SetBuffType ( GetBuffType () );
346
+ #endif
329
347
pBanner->ForceClientSideAnimationOn ();
330
348
SetBanner ( pBanner );
331
349
int iSpine = pPlayer->LookupBone ( " bip_spine_3" );
You can’t perform that action at this time.
0 commit comments