| 1981 | } |
| 1982 | |
| 1983 | void 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 | |
| 2009 | void CServer::OnNetMsgEnterGame(int ClientId) |
| 2010 | { |
nothing calls this directly
no test coverage detected