fixed filtering servers by maximum ping. closes #2026

This commit is contained in:
oy 2019-02-09 20:13:03 +01:00
parent 3c165cce00
commit 6febde3c9c
2 changed files with 1 additions and 3 deletions

View file

@ -119,7 +119,7 @@ void CServerBrowserFilter::CServerFilter::Filter()
Filtered = 1;
else if(m_FilterInfo.m_SortHash&IServerBrowser::FILTER_PURE_MAP && !(m_pServerBrowserFilter->m_ppServerlist[i]->m_Info.m_Flags&IServerBrowser::FLAG_PUREMAP))
Filtered = 1;
else if(m_FilterInfo.m_SortHash&IServerBrowser::FILTER_PING && m_FilterInfo.m_Ping < m_pServerBrowserFilter->m_ppServerlist[i]->m_Info.m_Latency)
else if(m_FilterInfo.m_Ping < m_pServerBrowserFilter->m_ppServerlist[i]->m_Info.m_Latency)
Filtered = 1;
else if(m_FilterInfo.m_SortHash&IServerBrowser::FILTER_COMPAT_VERSION && str_comp_num(m_pServerBrowserFilter->m_ppServerlist[i]->m_Info.m_aVersion, m_pServerBrowserFilter->m_aNetVersion, 3) != 0)
Filtered = 1;
@ -230,7 +230,6 @@ int CServerBrowserFilter::CServerFilter::GetSortHash() const
if(m_FilterInfo.m_SortHash&IServerBrowser::FILTER_PURE) i |= 1<<12;
if(m_FilterInfo.m_SortHash&IServerBrowser::FILTER_PURE_MAP) i |= 1<<13;
if(m_FilterInfo.m_SortHash&IServerBrowser::FILTER_COUNTRY) i |= 1<<14;
if(m_FilterInfo.m_SortHash&IServerBrowser::FILTER_PING) i |= 1<<15;
return i;
}

View file

@ -130,7 +130,6 @@ public:
FILTER_PURE=4096,
FILTER_PURE_MAP=8192,
FILTER_COUNTRY= 16384,
FILTER_PING= 32768,
};
virtual void SetType(int Type) = 0;