From 2081d778d55b09e684cebd4f1f750186426a692d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20M=C3=BCller?= Date: Fri, 27 Dec 2024 12:20:36 +0100 Subject: [PATCH] Fix current server's community information not being set The address of the current server's info was not set before the community and rank information is updated based on that address, causing the community information to always be unset. --- src/engine/client/client.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp index 538ebb33d5c..3030e8f61c9 100644 --- a/src/engine/client/client.cpp +++ b/src/engine/client/client.cpp @@ -1210,6 +1210,11 @@ void CClient::ProcessServerInfo(int RawType, NETADDR *pFrom, const void *pData, { Info = pEntry->m_Info; } + else + { + Info.m_NumAddresses = 1; + Info.m_aAddresses[0] = *pFrom; + } Info.m_Type = SavedType; @@ -1359,9 +1364,7 @@ void CClient::ProcessServerInfo(int RawType, NETADDR *pFrom, const void *pData, // us. if(SavedType >= m_CurrentServerInfo.m_Type) { - mem_copy(&m_CurrentServerInfo, &Info, sizeof(m_CurrentServerInfo)); - m_CurrentServerInfo.m_NumAddresses = 1; - m_CurrentServerInfo.m_aAddresses[0] = ServerAddress(); + m_CurrentServerInfo = Info; m_CurrentServerInfoRequestTime = -1; }