Skip to content

Commit 6102e81

Browse files
authored
Merge pull request #25 from wgetJane/master
fix war nag crash
2 parents f681dac + dc400c0 commit 6102e81

File tree

1 file changed

+0
-37
lines changed

1 file changed

+0
-37
lines changed

game/client/tf/tf_hud_mainmenuoverride.cpp

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -695,43 +695,6 @@ void CHudMainMenuOverride::OnTick()
695695
}
696696
}
697697

698-
// See if its time to nag about joining the war
699-
float flTimeSinceWarNag = Plat_FloatTime() - m_flLastWarNagTime;
700-
if ( !m_bPlayListExpanded && m_pHighlightAnims[ MMHA_WAR ] && ( flTimeSinceWarNag > 300.f || m_flLastWarNagTime == 0.f ) )
701-
{
702-
// Make sure our SOCache is ready
703-
GCSDK::CGCClientSharedObjectCache *pSOCache = NULL;
704-
if ( steamapicontext && steamapicontext->SteamUser() )
705-
{
706-
CSteamID steamID = steamapicontext->SteamUser()->GetSteamID();
707-
pSOCache = GCClientSystem()->GetSOCache( steamID );
708-
}
709-
710-
// Need to be initialized. If we're not, we'll get false positives
711-
// when we actually go to look for our war data
712-
if ( pSOCache && pSOCache->BIsInitialized() )
713-
{
714-
m_flLastWarNagTime = Plat_FloatTime();
715-
716-
// Get war data
717-
const CWarDefinition* pWarDef = GetItemSchema()->GetWarDefinitionByIndex( PYRO_VS_HEAVY_WAR_DEF_INDEX );
718-
CWarData *pWarData = GetLocalPlayerWarData( pWarDef->GetDefIndex() );
719-
war_side_t nAffiliation = INVALID_WAR_SIDE;
720-
if ( pWarData )
721-
{
722-
// Get affiliation if they have one.
723-
nAffiliation = pWarData->Obj().affiliation();
724-
}
725-
726-
// They haven't joined the war! Nag 'em
727-
if ( nAffiliation == INVALID_WAR_SIDE && pWarDef->IsActive() )
728-
{
729-
StartHighlightAnimation( MMHA_WAR );
730-
}
731-
}
732-
}
733-
734-
735698
#ifdef STAGING_ONLY
736699
if ( m_bGeneratingIcons )
737700
{

0 commit comments

Comments
 (0)