diff options
| author | eeeee <eeeee@qwe123.info> | 2011-11-03 07:17:04 +0400 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2011-11-29 22:16:41 +0100 |
| commit | 1452b6811cb2d4a547d941d8c8aaaf56b50e9ec6 (patch) | |
| tree | 29e64fc7fd05204c76aeeb8badc783984735e8b7 /src/engine/client | |
| parent | e858c9396b7821ea100c6950d70cd9cb212dc06b (diff) | |
| download | zcatch-1452b6811cb2d4a547d941d8c8aaaf56b50e9ec6.tar.gz zcatch-1452b6811cb2d4a547d941d8c8aaaf56b50e9ec6.zip | |
Replaced sorting implementation with stable one to prevent annoying flickering on server browser update.
Diffstat (limited to 'src/engine/client')
| -rw-r--r-- | src/engine/client/serverbrowser.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/engine/client/serverbrowser.cpp b/src/engine/client/serverbrowser.cpp index ddfc7597..0ffc03e8 100644 --- a/src/engine/client/serverbrowser.cpp +++ b/src/engine/client/serverbrowser.cpp @@ -283,16 +283,16 @@ void CServerBrowser::Sort() // sort if(g_Config.m_BrSort == IServerBrowser::SORT_NAME) - std::sort(m_pSortedServerlist, m_pSortedServerlist+m_NumSortedServers, SortWrap(this, &CServerBrowser::SortCompareName)); + std::stable_sort(m_pSortedServerlist, m_pSortedServerlist+m_NumSortedServers, SortWrap(this, &CServerBrowser::SortCompareName)); else if(g_Config.m_BrSort == IServerBrowser::SORT_PING) - std::sort(m_pSortedServerlist, m_pSortedServerlist+m_NumSortedServers, SortWrap(this, &CServerBrowser::SortComparePing)); + std::stable_sort(m_pSortedServerlist, m_pSortedServerlist+m_NumSortedServers, SortWrap(this, &CServerBrowser::SortComparePing)); else if(g_Config.m_BrSort == IServerBrowser::SORT_MAP) - std::sort(m_pSortedServerlist, m_pSortedServerlist+m_NumSortedServers, SortWrap(this, &CServerBrowser::SortCompareMap)); + std::stable_sort(m_pSortedServerlist, m_pSortedServerlist+m_NumSortedServers, SortWrap(this, &CServerBrowser::SortCompareMap)); else if(g_Config.m_BrSort == IServerBrowser::SORT_NUMPLAYERS) - std::sort(m_pSortedServerlist, m_pSortedServerlist+m_NumSortedServers, SortWrap(this, + std::stable_sort(m_pSortedServerlist, m_pSortedServerlist+m_NumSortedServers, SortWrap(this, g_Config.m_BrFilterSpectators ? &CServerBrowser::SortCompareNumPlayers : &CServerBrowser::SortCompareNumClients)); else if(g_Config.m_BrSort == IServerBrowser::SORT_GAMETYPE) - std::sort(m_pSortedServerlist, m_pSortedServerlist+m_NumSortedServers, SortWrap(this, &CServerBrowser::SortCompareGametype)); + std::stable_sort(m_pSortedServerlist, m_pSortedServerlist+m_NumSortedServers, SortWrap(this, &CServerBrowser::SortCompareGametype)); // invert the list if requested if(g_Config.m_BrSortOrder) |