Skip to content

Commit 152a11a

Browse files
committed
Merge remote-tracking branch 'upstream/master' into release/no-gc-test
2 parents af5573c + 88fa198 commit 152a11a

2 files changed

Lines changed: 43 additions & 24 deletions

File tree

src/game/client/tf/c_tf_player.cpp

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3256,6 +3256,49 @@ bool CStatTrakDigitProxy::HelperOnBindGetStatTrakScore( void *pC_BaseEntity, int
32563256
}
32573257
}
32583258
}
3259+
else
3260+
{
3261+
CTFWeaponBase* pWeap = NULL;
3262+
3263+
// Check if it's an attachment for world model
3264+
C_TFWeaponAttachmentModel* pAttachment = dynamic_cast<C_TFWeaponAttachmentModel*>( pEntity );
3265+
if ( pAttachment )
3266+
{
3267+
// If we're dealing with a world model, Stat Clock will be it's child attachment
3268+
C_BaseEntity* pParent = pAttachment->GetMoveParent();
3269+
if ( pParent )
3270+
{
3271+
pWeap = dynamic_cast<CTFWeaponBase*>( pParent );
3272+
}
3273+
}
3274+
3275+
if ( pWeap )
3276+
{
3277+
CEconItemView* pItem = pWeap->GetAttributeContainer()->GetItem();
3278+
if ( pItem && pItem->FindAttribute( GetKillEaterAttr_Score( 0 ), &unScore ) )
3279+
{
3280+
*piScore = unScore;
3281+
bReturnValue = true;
3282+
}
3283+
}
3284+
else
3285+
{
3286+
// Are we dealing with a dropped weapon?
3287+
C_BaseEntity* pParent = pEntity->GetMoveParent();
3288+
CTFDroppedWeapon* pDroppedWeapon = dynamic_cast<CTFDroppedWeapon*>( pParent );
3289+
3290+
if ( pDroppedWeapon )
3291+
{
3292+
// We're able to extract item attributes from dropped weapons, including strange count
3293+
CEconItemView* pItem = pDroppedWeapon->GetItem();
3294+
if ( pItem && pItem->FindAttribute( GetKillEaterAttr_Score( 0 ), &unScore ) )
3295+
{
3296+
*piScore = unScore;
3297+
bReturnValue = true;
3298+
}
3299+
}
3300+
}
3301+
}
32593302
}
32603303
else
32613304
{

src/game/shared/tf/entity_capture_flag.cpp

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -573,16 +573,6 @@ bool CCaptureFlag::ShouldHideGlowEffect( void )
573573
// In non-CTF control the flag changes to the team that's carrying it
574574
bIsHiddenTeam = ( pLocalPlayer->GetTeamNumber() != TEAM_SPECTATOR && pLocalPlayer->GetTeamNumber() != GetTeamNumber() );
575575
}
576-
577-
// UNDONE(mcoms): why is this here? if WE'RE invisible, we can't see people carrying the flag?
578-
#if 0
579-
if ( pLocalPlayer->m_Shared.IsFullyInvisible() )
580-
{
581-
C_TFPlayer *pOwner = ToTFPlayer( m_hPrevOwner );
582-
if ( pOwner && pOwner != pLocalPlayer )
583-
return true;
584-
}
585-
#endif
586576
}
587577

588578
bool bHide = IsStolen() && bIsHiddenTeam;
@@ -2615,20 +2605,6 @@ void CCaptureFlag::Simulate( void )
26152605
BaseClass::Simulate();
26162606

26172607
ManageTrailEffects();
2618-
2619-
C_TFPlayer *pLocalPlayer = C_TFPlayer::GetLocalTFPlayer();
2620-
if ( m_hPrevOwner && m_hPrevOwner->IsPlayer() && pLocalPlayer && pLocalPlayer->m_Shared.IsFullyInvisible() && !IsEffectActive( EF_NODRAW ) )
2621-
{
2622-
C_TFPlayer *pTFOwner = ToTFPlayer( m_hPrevOwner );
2623-
if ( pTFOwner && pTFOwner != pLocalPlayer )
2624-
{
2625-
AddEffects( EF_NODRAW );
2626-
}
2627-
}
2628-
else if ( IsEffectActive( EF_NODRAW ) && ( IsStolen() || IsDropped() ) )
2629-
{
2630-
RemoveEffects( EF_NODRAW );
2631-
}
26322608
}
26332609

26342610
void CCaptureFlag::ManageTrailEffects( void )

0 commit comments

Comments
 (0)