1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2025-09-19 12:06:07 +08:00

Sync with latest source-sdk-2013.

This commit is contained in:
Nicholas Hastings
2014-10-30 12:30:57 -04:00
parent 6abc7fddca
commit aa5841f220
407 changed files with 6784 additions and 10498 deletions

View File

@ -662,7 +662,8 @@ void CVoteSetupDialog::OnItemSelected( vgui::Panel *panel )
for ( int index = 0; index < m_VoteIssuesPopFiles.Count(); index++ )
{
// Don't show the current pop file
if ( TFObjectiveResource()->GetMvMPopFileName() == '\0' )
const char *pszPopFileName = TFObjectiveResource()->GetMvMPopFileName();
if ( !pszPopFileName || !pszPopFileName[0] )
{
// Use the map name
char szShortMapName[ MAX_MAP_NAME ];
@ -982,6 +983,12 @@ void CHudVote::MsgFunc_CallVoteFailed( bf_read &msg )
char szTime[256];
wchar_t wszTime[256];
bool bMinutes = ( nTime > 65 );
if ( bMinutes )
{
nTime /= 60;
}
const char *pszTimeString = ( bMinutes ) ? ( ( nTime < 2 ) ? "#GameUI_vote_failed_recently_min" : "#GameUI_vote_failed_recently_mins" ) : "#GameUI_vote_failed_recently";
Q_snprintf( szTime, sizeof ( szTime), "%i", nTime );
g_pVGuiLocalize->ConvertANSIToUnicode( szTime, wszTime, sizeof( wszTime ) );
@ -1020,8 +1027,8 @@ void CHudVote::MsgFunc_CallVoteFailed( bf_read &msg )
m_pCallVoteFailed->SetControlString( "FailedReason", "#GameUI_vote_failed_map_name_required" );
break;
case VOTE_FAILED_FAILED_RECENTLY:
g_pVGuiLocalize->ConstructString( wszHeaderString, sizeof(wszHeaderString), g_pVGuiLocalize->Find( "#GameUI_vote_failed_recently" ), 1, wszTime );
case VOTE_FAILED_ON_COOLDOWN:
g_pVGuiLocalize->ConstructString( wszHeaderString, sizeof( wszHeaderString ), g_pVGuiLocalize->Find( pszTimeString ), 1, wszTime );
pwszHeaderString = wszHeaderString;
m_pCallVoteFailed->SetDialogVariable( "FailedReason", pwszHeaderString );
break;