64 Player Filter Button

This commit is contained in:
def 2014-01-11 21:38:50 +01:00
parent dce37516f5
commit 188635162e
3 changed files with 9 additions and 2 deletions

View file

@ -580,7 +580,8 @@ void CServerBrowser::RequestImpl64(const NETADDR &Addr, CServerEntry *pEntry) co
void CServerBrowser::Request(const NETADDR &Addr) const
{
RequestImpl64(Addr, 0);
if(g_Config.m_BrFilter64Player)
RequestImpl64(Addr, 0);
RequestImpl(Addr, 0);
}
@ -713,7 +714,8 @@ void CServerBrowser::Update(bool ForceResort)
if(pEntry->m_RequestTime == 0)
{
RequestImpl64(pEntry->m_Addr, pEntry);
if(g_Config.m_BrFilter64Player)
RequestImpl64(pEntry->m_Addr, pEntry);
RequestImpl(pEntry->m_Addr, pEntry);
}

View file

@ -43,6 +43,7 @@ MACRO_CONFIG_STR(BrFilterServerAddress, br_filter_serveraddress, 128, "", CFGFLA
MACRO_CONFIG_INT(BrFilterPure, br_filter_pure, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Filter out non-standard servers in browser")
MACRO_CONFIG_INT(BrFilterPureMap, br_filter_pure_map, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Filter out non-standard maps in browser")
MACRO_CONFIG_INT(BrFilterCompatversion, br_filter_compatversion, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Filter out non-compatible servers in browser")
MACRO_CONFIG_INT(BrFilter64Player, br_filter_64_player, 1, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Request 64 player servers (more bandwidth)")
MACRO_CONFIG_INT(BrSort, br_sort, 0, 0, 256, CFGFLAG_SAVE|CFGFLAG_CLIENT, "")
MACRO_CONFIG_INT(BrSortOrder, br_sort_order, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "")

View file

@ -574,6 +574,10 @@ void CMenus::RenderServerbrowserFilters(CUIRect View)
m_Popup = POPUP_COUNTRY;
}
ServerFilter.HSplitTop(20.0f, &Button, &ServerFilter);
if (DoButton_CheckBox((char *)&g_Config.m_BrFilter64Player, Localize("64 Player Servers"), g_Config.m_BrFilter64Player, &Button))
g_Config.m_BrFilter64Player ^= 1;
ServerFilter.HSplitBottom(5.0f, &ServerFilter, 0);
ServerFilter.HSplitBottom(ms_ButtonHeight-2.0f, &ServerFilter, &Button);
static int s_ClearButton = 0;