mirror of
https://github.com/celisej567/source-engine.git
synced 2026-01-04 18:09:53 +03:00
fix some undefined/unspecified behaviours in multiplayer games( may help with #299 )
This commit is contained in:
@@ -115,7 +115,7 @@ void CTeamMenu::ApplySchemeSettings(IScheme *pScheme)
|
||||
|
||||
if ( *m_szMapName )
|
||||
{
|
||||
LoadMapPage( m_szMapName ); // reload the map description to pick up the color
|
||||
LoadMapPage( NULL ); // reload the map description to pick up the color
|
||||
}
|
||||
}
|
||||
|
||||
@@ -185,22 +185,23 @@ void CTeamMenu::Update()
|
||||
void CTeamMenu::LoadMapPage( const char *mapName )
|
||||
{
|
||||
// Save off the map name so we can re-load the page in ApplySchemeSettings().
|
||||
Q_strncpy( m_szMapName, mapName, strlen( mapName ) + 1 );
|
||||
|
||||
if( mapName )
|
||||
Q_strncpy( m_szMapName, mapName, strlen( mapName ) + 1 );
|
||||
|
||||
char mapRES[ MAX_PATH ];
|
||||
|
||||
char uilanguage[ 64 ];
|
||||
uilanguage[0] = 0;
|
||||
engine->GetUILanguage( uilanguage, sizeof( uilanguage ) );
|
||||
|
||||
Q_snprintf( mapRES, sizeof( mapRES ), "resource/maphtml/%s_%s.html", mapName, uilanguage );
|
||||
Q_snprintf( mapRES, sizeof( mapRES ), "resource/maphtml/%s_%s.html", m_szMapName, uilanguage );
|
||||
|
||||
bool bFoundHTML = false;
|
||||
|
||||
if ( !g_pFullFileSystem->FileExists( mapRES ) )
|
||||
{
|
||||
// try english
|
||||
Q_snprintf( mapRES, sizeof( mapRES ), "resource/maphtml/%s_english.html", mapName );
|
||||
Q_snprintf( mapRES, sizeof( mapRES ), "resource/maphtml/%s_english.html", m_szMapName );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -240,7 +241,7 @@ void CTeamMenu::LoadMapPage( const char *mapName )
|
||||
#endif
|
||||
}
|
||||
|
||||
Q_snprintf( mapRES, sizeof( mapRES ), "maps/%s.txt", mapName);
|
||||
Q_snprintf( mapRES, sizeof( mapRES ), "maps/%s.txt", m_szMapName);
|
||||
|
||||
// if no map specific description exists, load default text
|
||||
if( !g_pFullFileSystem->FileExists( mapRES ) )
|
||||
|
||||
Reference in New Issue
Block a user