game: add CTFLabel

This commit is contained in:
SanyaSho 2022-08-10 20:38:35 +03:00
parent 12a8b08267
commit c11e8432c1
2 changed files with 7 additions and 3 deletions

View File

@ -345,7 +345,11 @@ private:
bool m_bCachedCountdownState; bool m_bCachedCountdownState;
CControlPointCountdown *m_pCountdown; CControlPointCountdown *m_pCountdown;
#if defined( TF_MOD_CLIENT )
DHANDLE< CTFLabel > m_pCPTimerLabel; // used to display CCPTimerLogic countdowns
#else
DHANDLE< CExLabel > m_pCPTimerLabel; // used to display CCPTimerLogic countdowns DHANDLE< CExLabel > m_pCPTimerLabel; // used to display CCPTimerLogic countdowns
#endif
DHANDLE< vgui::ImagePanel > m_pCPTimerBG; // used to display CCPTimerLogic countdowns DHANDLE< vgui::ImagePanel > m_pCPTimerBG; // used to display CCPTimerLogic countdowns
float m_flCPTimerTime; float m_flCPTimerTime;
bool m_bRedText; bool m_bRedText;

View File

@ -610,7 +610,7 @@ void C_TFRagdoll::ClientThink( void )
int iAlpha = GetRenderColor().a; int iAlpha = GetRenderColor().a;
int iFadeSpeed = 600.0f; int iFadeSpeed = 600.0f;
iAlpha = max( iAlpha - ( iFadeSpeed * gpGlobals->frametime ), 0 ); iAlpha = MAX( iAlpha - ( iFadeSpeed * gpGlobals->frametime ), 0 );
SetRenderMode( kRenderTransAlpha ); SetRenderMode( kRenderTransAlpha );
SetRenderColorA( iAlpha ); SetRenderColorA( iAlpha );
@ -1267,7 +1267,7 @@ void C_TFPlayer::OnDataChanged( DataUpdateType_t updateType )
if ( m_bDisguised != m_Shared.InCond( TF_COND_DISGUISED ) ) if ( m_bDisguised != m_Shared.InCond( TF_COND_DISGUISED ) )
{ {
m_flDisguiseEndEffectStartTime = max( m_flDisguiseEndEffectStartTime, gpGlobals->curtime ); m_flDisguiseEndEffectStartTime = MAX( m_flDisguiseEndEffectStartTime, gpGlobals->curtime );
} }
int nNewWaterLevel = GetWaterLevel(); int nNewWaterLevel = GetWaterLevel();
@ -2227,7 +2227,7 @@ void C_TFPlayer::AvoidPlayers( CUserCmd *pCmd )
flSideScale = fabs( cl_sidespeed.GetFloat() ) / fabs( pCmd->sidemove ); flSideScale = fabs( cl_sidespeed.GetFloat() ) / fabs( pCmd->sidemove );
} }
float flScale = min( flForwardScale, flSideScale ); float flScale = MIN( flForwardScale, flSideScale );
pCmd->forwardmove *= flScale; pCmd->forwardmove *= flScale;
pCmd->sidemove *= flScale; pCmd->sidemove *= flScale;