Skip to content

Commit 4ee7dbb

Browse files
committed
don't try to find the display model again in player model panel
just go with the item in that slot, the second check is expensive and i am not sure what the need of it is. if some greater context explains why it is needed, then this patch can be skipped.
1 parent ea8a0b0 commit 4ee7dbb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/game/client/tf/vgui/tf_playermodelpanel.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1349,6 +1349,9 @@ CEconItemView *CTFPlayerModelPanel::GetLoadoutItemFromMDLHandle( loadout_positio
13491349
if ( ( IsMiscSlot( iLoadoutSlot ) && IsMiscSlot( iPosition ) ) ||
13501350
( IsValidPickupWeaponSlot( iLoadoutSlot ) && iLoadoutSlot == iPosition ) )
13511351
{
1352+
return pItem;
1353+
// UNDONE: this check is making model panel absurdly expensively, and for what?
1354+
#if 0
13521355
const char * pDisplayModel = pItem->GetPlayerDisplayModel( m_iCurrentClassIndex, m_iTeam );
13531356
if ( pDisplayModel )
13541357
{
@@ -1362,6 +1365,7 @@ CEconItemView *CTFPlayerModelPanel::GetLoadoutItemFromMDLHandle( loadout_positio
13621365
}
13631366
vgui::MDLCache()->Release(hMDLFindResult);
13641367
}
1368+
#endif
13651369
}
13661370
}
13671371

0 commit comments

Comments
 (0)