mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 22:48:18 +00:00
Merge pull request #7780 from Robyt3/Serverbrowser-Community-Update-Fix
Fix community not set for servers with missing server info
This commit is contained in:
commit
9de11a5ecd
|
@ -550,7 +550,9 @@ void CServerBrowser::SetInfo(CServerEntry *pEntry, const CServerInfo &Info) cons
|
|||
mem_copy(pEntry->m_Info.m_aAddresses, TmpInfo.m_aAddresses, sizeof(pEntry->m_Info.m_aAddresses));
|
||||
pEntry->m_Info.m_NumAddresses = TmpInfo.m_NumAddresses;
|
||||
ServerBrowserFormatAddresses(pEntry->m_Info.m_aAddress, sizeof(pEntry->m_Info.m_aAddress), pEntry->m_Info.m_aAddresses, pEntry->m_Info.m_NumAddresses);
|
||||
UpdateServerCommunity(&pEntry->m_Info);
|
||||
str_copy(pEntry->m_Info.m_aCommunityId, TmpInfo.m_aCommunityId);
|
||||
str_copy(pEntry->m_Info.m_aCommunityCountry, TmpInfo.m_aCommunityCountry);
|
||||
str_copy(pEntry->m_Info.m_aCommunityType, TmpInfo.m_aCommunityType);
|
||||
UpdateServerRank(&pEntry->m_Info);
|
||||
|
||||
if(pEntry->m_Info.m_ClientScoreKind == CServerInfo::CLIENT_SCORE_KIND_UNSPECIFIED)
|
||||
|
@ -662,6 +664,7 @@ CServerBrowser::CServerEntry *CServerBrowser::Add(const NETADDR *pAddrs, int Num
|
|||
pEntry->m_Info.m_Latency = 999;
|
||||
pEntry->m_Info.m_HasRank = CServerInfo::RANK_UNAVAILABLE;
|
||||
ServerBrowserFormatAddresses(pEntry->m_Info.m_aAddress, sizeof(pEntry->m_Info.m_aAddress), pEntry->m_Info.m_aAddresses, pEntry->m_Info.m_NumAddresses);
|
||||
UpdateServerCommunity(&pEntry->m_Info);
|
||||
str_copy(pEntry->m_Info.m_aName, pEntry->m_Info.m_aAddress, sizeof(pEntry->m_Info.m_aName));
|
||||
|
||||
// check if it's a favorite
|
||||
|
|
Loading…
Reference in a new issue