prevent disabling the pure filter in the standard browserfilter

This commit is contained in:
oy 2018-10-23 21:49:23 +02:00
parent a5f5853570
commit 4d78d67d97
2 changed files with 3 additions and 1 deletions

View file

@ -192,6 +192,8 @@ void CMenus::LoadFilters()
// add filter
m_lFilters.add(CBrowserFilter(Type, pName, ServerBrowser(), 0, 999, -1, "", ""));
if(Type == CBrowserFilter::FILTER_STANDARD) // make sure the pure filter is enabled in the Teeworlds-filter
FilterInfo.m_SortHash |= IServerBrowser::FILTER_PURE;
m_lFilters[i].SetFilter(&FilterInfo);
}

View file

@ -139,7 +139,7 @@ int CMenus::PopupFilter(CMenus *pMenus, CUIRect View)
ServerFilter.HSplitTop(20.0f, &Button, &ServerFilter);
static int s_BrFilterPure = 0;
if(pMenus->DoButton_CheckBox(&s_BrFilterPure, Localize("Standard gametype"), FilterInfo.m_SortHash&IServerBrowser::FILTER_PURE, &Button))
if(pMenus->DoButton_CheckBox(&s_BrFilterPure, Localize("Standard gametype"), FilterInfo.m_SortHash&IServerBrowser::FILTER_PURE, &Button) && pFilter->Custom() != CBrowserFilter::FILTER_STANDARD)
NewSortHash = FilterInfo.m_SortHash^IServerBrowser::FILTER_PURE;
ServerFilter.HSplitTop(20.0f, &Button, &ServerFilter);