diff options
Diffstat (limited to 'src/game/client/gameclient.cpp')
| -rw-r--r-- | src/game/client/gameclient.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/game/client/gameclient.cpp b/src/game/client/gameclient.cpp index b6e89a7b..15786110 100644 --- a/src/game/client/gameclient.cpp +++ b/src/game/client/gameclient.cpp @@ -26,6 +26,7 @@ #include "components/chat.h" #include "components/console.h" #include "components/controls.h" +#include "components/countryflags.h" #include "components/damageind.h" #include "components/debughud.h" #include "components/effects.h" @@ -60,6 +61,7 @@ static CBinds gs_Binds; static CParticles gs_Particles; static CMenus gs_Menus; static CSkins gs_Skins; +static CCountryFlags gs_CountryFlags; static CFlow gs_Flow; static CHud gs_Hud; static CDebugHud gs_DebugHud; @@ -107,6 +109,7 @@ void CGameClient::OnConsoleInit() m_pParticles = &::gs_Particles; m_pMenus = &::gs_Menus; m_pSkins = &::gs_Skins; + m_pCountryFlags = &::gs_CountryFlags; m_pChat = &::gs_Chat; m_pFlow = &::gs_Flow; m_pCamera = &::gs_Camera; @@ -121,6 +124,7 @@ void CGameClient::OnConsoleInit() // make a list of all the systems, make sure to add them in the corrent render order m_All.Add(m_pSkins); + m_All.Add(m_pCountryFlags); m_All.Add(m_pMapimages); m_All.Add(m_pEffects); // doesn't render anything, just updates effects m_All.Add(m_pParticles); @@ -697,6 +701,15 @@ void CGameClient::OnNewSnapshot() m_aClients[ClientID].m_UseCustomColor = pInfo->m_UseCustomColor; m_aClients[ClientID].m_ColorBody = pInfo->m_ColorBody; m_aClients[ClientID].m_ColorFeet = pInfo->m_ColorFeet; + + // find country flag + m_aClients[ClientID].m_Country = g_GameClient.m_pCountryFlags->Find(m_aClients[ClientID].m_Country); + if(m_aClients[ClientID].m_Country < 0) + { + m_aClients[ClientID].m_Country = g_GameClient.m_pCountryFlags->Find(-1); + if(m_aClients[ClientID].m_Country < 0) + m_aClients[ClientID].m_Country = 0; + } // prepare the info if(m_aClients[ClientID].m_aSkinName[0] == 'x' || m_aClients[ClientID].m_aSkinName[1] == '_') |