diff --git a/src/engine/client/serverbrowser.cpp b/src/engine/client/serverbrowser.cpp index 6c71a9cb4..c5ec83159 100644 --- a/src/engine/client/serverbrowser.cpp +++ b/src/engine/client/serverbrowser.cpp @@ -1088,6 +1088,22 @@ void CServerBrowser::LoadDDNetServers() } } +void CServerBrowser::RecheckOfficial() +{ + for(int i = 0; i < m_NumDDNetCountries; i++) + { + CDDNetCountry *pCntr = &m_aDDNetCountries[i]; + for(int j = 0; j < pCntr->m_NumServers; j++) + { + CServerEntry *pEntry = Find(pCntr->m_aServers[j]); + if(pEntry) + { + pEntry->m_Info.m_Official = true; + } + } + } +} + void CServerBrowser::LoadDDNetRanks() { for(int i = 0; i < m_NumServers; i++) @@ -1163,9 +1179,14 @@ const json_value *CServerBrowser::LoadDDNetInfo() LoadDDNetServers(); if(m_NumServers == 0) + { Refresh(m_ServerlistType); + } else + { + RecheckOfficial(); LoadDDNetRanks(); + } return m_pDDNetInfo; } diff --git a/src/engine/client/serverbrowser.h b/src/engine/client/serverbrowser.h index f78e1a1d8..7787c43c6 100644 --- a/src/engine/client/serverbrowser.h +++ b/src/engine/client/serverbrowser.h @@ -86,6 +86,7 @@ public: void RemoveFavorite(const NETADDR &Addr); void LoadDDNetRanks(); + void RecheckOfficial(); void LoadDDNetServers(); void LoadDDNetInfoJson(); const json_value *LoadDDNetInfo();