Skip to content

Commit

Permalink
Fix current server's community information not being set
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Robyt3 committed Dec 27, 2024
1 parent 81db700 commit 2081d77
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/engine/client/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 2081d77

Please sign in to comment.