//----------------------------------------------------------------------------- // Purpose: Console command to fade in from a given color. //----------------------------------------------------------------------------- static void CC_FadeIn( const CCommand &args ) { float flTime; color32 clrFade; GetFadeParms( args, flTime, clrFade ); CBasePlayer *pPlayer = UTIL_GetCommandClient(); UTIL_ScreenFade( pPlayer, clrFade, flTime, 0, FFADE_IN | FFADE_PURGE ); }
//----------------------------------------------------------------------------- // Purpose: Console command to fade out to a given color. //----------------------------------------------------------------------------- static void CC_FadeOut( void ) { float flTime; color32 clrFade; GetFadeParms( flTime, clrFade ); CBasePlayer *pPlayer = UTIL_GetCommandClient(); UTIL_ScreenFade( pPlayer, clrFade, flTime, 0, FFADE_OUT | FFADE_PURGE | FFADE_STAYOUT ); }