Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/game/client/tf/c_tf_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3133,6 +3133,14 @@ bool CStatTrakDigitProxy::HelperOnBindGetStatTrakScore( void *pC_BaseEntity, int
if ( pWeap->GetAttributeContainer()->GetItem()->FindAttribute( GetKillEaterAttr_Score( 0 ), &unScore ) )
{
*piScore = unScore;

// If we are in MvM mode, overwrite with Robots Destroyed count (if item is tracking this)
if (TFGameRules() && TFGameRules()->IsMannVsMachineMode()
&& GetKilleaterValueByEvent(pWeap->GetAttributeContainer()->GetItem(), kKillEaterEvent_RobotsDestroyed, unScore))
{
*piScore = unScore;
}

bReturnValue = true;
}
}
Expand Down
7 changes: 6 additions & 1 deletion src/game/shared/tf/tf_weaponbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6753,7 +6753,12 @@ void CTFWeaponBase::AddStatTrakModel( CEconItemView *pItem, int nStatTrakType, A

// Skin
int nSkin = pItem->GetTeamNumber() - TF_TEAM_RED;
if ( pItem->GetAccountID() != holderAcctId )
uint32 statVal = 0;
if ( TFGameRules() && TFGameRules()->IsMannVsMachineMode() && GetKilleaterValueByEvent(pItem, kKillEaterEvent_RobotsDestroyed, statVal) ) // If item has Robots Destroyed counter, display robot icon in MvM mode
{
nSkin += 4;
}
else if ( pItem->GetAccountID() != holderAcctId ) // Do not need to worry about this in MvM mode as weapons cannot be dropped there
{
nSkin += 2; // sad skin
}
Expand Down