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

Method OnNetMsgReady

src/engine/server/server.cpp:1983–2007  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1981}
1982
1983void CServer::OnNetMsgReady(int ClientId)
1984{
1985 if(m_aClients[ClientId].m_State == CClient::STATE_CONNECTING)
1986 {
1987 log_debug(
1988 "server",
1989 "player is ready. ClientId=%d addr=<{%s}> secure=%s",
1990 ClientId,
1991 ClientAddrString(ClientId, true),
1992 m_NetServer.HasSecurityToken(ClientId) ? "yes" : "no");
1993
1994 void *pPersistentData = nullptr;
1995 if(m_aClients[ClientId].m_HasPersistentData)
1996 {
1997 pPersistentData = m_aClients[ClientId].m_pPersistentData;
1998 m_aClients[ClientId].m_HasPersistentData = false;
1999 }
2000 m_aClients[ClientId].m_State = CClient::STATE_READY;
2001 GameServer()->OnClientConnected(ClientId, pPersistentData);
2002 }
2003
2004 // Make rejoining session possible before timeout protection triggers
2005 // https://github.com/ddnet/ddnet/pull/301
2006 SendConnectionReady(ClientId);
2007}
2008
2009void CServer::OnNetMsgEnterGame(int ClientId)
2010{

Callers

nothing calls this directly

Calls 2

HasSecurityTokenMethod · 0.80
OnClientConnectedMethod · 0.80

Tested by

no test coverage detected