MCPcopy Create free account
hub / github.com/ddnet/ddnet / UpdateServerFriends

Method UpdateServerFriends

src/engine/client/serverbrowser.cpp:1646–1657  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1644}
1645
1646void CServerBrowser::UpdateServerFriends(CServerInfo *pInfo) const
1647{
1648 pInfo->m_FriendState = IFriends::FRIEND_NO;
1649 pInfo->m_FriendNum = 0;
1650 for(int ClientIndex = 0; ClientIndex < minimum(pInfo->m_NumReceivedClients, (int)MAX_CLIENTS); ClientIndex++)
1651 {
1652 pInfo->m_aClients[ClientIndex].m_FriendState = m_pFriends->GetFriendState(pInfo->m_aClients[ClientIndex].m_aName, pInfo->m_aClients[ClientIndex].m_aClan);
1653 pInfo->m_FriendState = maximum(pInfo->m_FriendState, pInfo->m_aClients[ClientIndex].m_FriendState);
1654 if(pInfo->m_aClients[ClientIndex].m_FriendState != IFriends::FRIEND_NO)
1655 pInfo->m_FriendNum++;
1656 }
1657}
1658
1659void CServerBrowser::UpdateServerCommunity(CServerInfo *pInfo) const
1660{

Callers

nothing calls this directly

Calls 3

maximumFunction · 0.85
GetFriendStateMethod · 0.80
minimumFunction · 0.50

Tested by

no test coverage detected