diff options
| author | oy <Tom_Adams@web.de> | 2011-06-29 22:27:32 +0200 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2011-06-29 22:27:32 +0200 |
| commit | 123eab41c8e201da58ffbb6bb215716334bec652 (patch) | |
| tree | 833b3e608d243f72e23fa7eacd5ccd980021fad0 /src/game/client/components/menus_settings.cpp | |
| parent | 8035e022fdefbf5ebbdd9a92d79fe7c3f1a76bdb (diff) | |
| download | zcatch-123eab41c8e201da58ffbb6bb215716334bec652.tar.gz zcatch-123eab41c8e201da58ffbb6bb215716334bec652.zip | |
made it possible to filter by player country in the server browser. Closes #654
Diffstat (limited to 'src/game/client/components/menus_settings.cpp')
| -rw-r--r-- | src/game/client/components/menus_settings.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/game/client/components/menus_settings.cpp b/src/game/client/components/menus_settings.cpp index 82d3f652..3fb0ab94 100644 --- a/src/game/client/components/menus_settings.cpp +++ b/src/game/client/components/menus_settings.cpp @@ -208,10 +208,7 @@ void CMenus::RenderSettingsPlayer(CUIRect MainView) for(int i = 0; i < m_pClient->m_pCountryFlags->Num(); ++i) { - const CCountryFlags::CCountryFlag *pEntry = m_pClient->m_pCountryFlags->Get(i); - if(pEntry == 0) - continue; - + const CCountryFlags::CCountryFlag *pEntry = m_pClient->m_pCountryFlags->GetByIndex(i); if(pEntry->m_CountryCode == g_Config.m_PlayerCountry) OldSelected = i; @@ -234,7 +231,7 @@ void CMenus::RenderSettingsPlayer(CUIRect MainView) const int NewSelected = UiDoListboxEnd(&s_ScrollValue, 0); if(OldSelected != NewSelected) { - g_Config.m_PlayerCountry = m_pClient->m_pCountryFlags->Get(NewSelected)->m_CountryCode; + g_Config.m_PlayerCountry = m_pClient->m_pCountryFlags->GetByIndex(NewSelected)->m_CountryCode; m_NeedSendinfo = true; } } |