mirror of
https://github.com/ValveSoftware/source-sdk-2013.git
synced 2026-03-06 22:14:09 +01:00
[TF] Add null pointer checks for recent casual doors fix.
This commit is contained in:
@@ -575,32 +575,38 @@ void CTFHudMatchStatus::FireGameEvent( IGameEvent * event )
|
||||
|
||||
const IMatchGroupDescription* pMatchDesc = GetMatchGroupDescription( TFGameRules()->GetCurrentMatchGroup() );
|
||||
|
||||
// FIX: Refresh versus doors so late-joiners do not see the wrong skin
|
||||
int nSkin = 0;
|
||||
int nSubModel = 0;
|
||||
if (pMatchDesc->BGetRoundDoorParameters(nSkin, nSubModel))
|
||||
if ( pMatchDesc )
|
||||
{
|
||||
// Is VS doors model not initialized yet?
|
||||
if (m_pMatchStartModelPanel->m_hModel == NULL)
|
||||
// FIX: Refresh versus doors so late-joiners do not see the wrong skin
|
||||
int nSkin = 0;
|
||||
int nSubModel = 0;
|
||||
if ( pMatchDesc->BGetRoundDoorParameters( nSkin, nSubModel ) )
|
||||
{
|
||||
m_pMatchStartModelPanel->UpdateModel();
|
||||
if ( m_pMatchStartModelPanel )
|
||||
{
|
||||
// Is VS doors model not initialized yet?
|
||||
if ( m_pMatchStartModelPanel->m_hModel == NULL )
|
||||
{
|
||||
m_pMatchStartModelPanel->UpdateModel();
|
||||
}
|
||||
|
||||
m_pMatchStartModelPanel->SetBodyGroup( "logos", nSubModel );
|
||||
m_pMatchStartModelPanel->UpdateModel();
|
||||
m_pMatchStartModelPanel->SetSkin( nSkin );
|
||||
}
|
||||
}
|
||||
|
||||
m_pMatchStartModelPanel->SetBodyGroup( "logos", nSubModel );
|
||||
m_pMatchStartModelPanel->UpdateModel();
|
||||
m_pMatchStartModelPanel->SetSkin( nSkin );
|
||||
}
|
||||
|
||||
bool bForceDoors = false;
|
||||
if ( bForceDoors || ( pMatchDesc && pMatchDesc->BUsesPostRoundDoors() ) )
|
||||
{
|
||||
if ( TFGameRules() && TFGameRules()->MapHasMatchSummaryStage() && ( bForceDoors || pMatchDesc->BUseMatchSummaryStage() ) )
|
||||
bool bForceDoors = false;
|
||||
if ( bForceDoors || ( pMatchDesc && pMatchDesc->BUsesPostRoundDoors() ) )
|
||||
{
|
||||
g_pClientMode->GetViewportAnimationController()->StartAnimationSequence( this, "HudMatchStatus_ShowMatchWinDoors", false );
|
||||
}
|
||||
else
|
||||
{
|
||||
g_pClientMode->GetViewportAnimationController()->StartAnimationSequence( this, "HudMatchStatus_ShowMatchWinDoors_NoOpen", false );
|
||||
if ( TFGameRules() && TFGameRules()->MapHasMatchSummaryStage() && ( bForceDoors || pMatchDesc->BUseMatchSummaryStage() ) )
|
||||
{
|
||||
g_pClientMode->GetViewportAnimationController()->StartAnimationSequence( this, "HudMatchStatus_ShowMatchWinDoors", false );
|
||||
}
|
||||
else
|
||||
{
|
||||
g_pClientMode->GetViewportAnimationController()->StartAnimationSequence( this, "HudMatchStatus_ShowMatchWinDoors_NoOpen", false );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user