From 27e5a6af0d09192e1a865332f35bde4a0ac180dd Mon Sep 17 00:00:00 2001 From: oy Date: Tue, 15 Mar 2011 09:58:57 +0100 Subject: made clients sending startinfo a requirement to prevent empty player infos --- src/engine/client/client.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/engine/client/client.cpp') diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp index 5ed0b37b..1c0a3a01 100644 --- a/src/engine/client/client.cpp +++ b/src/engine/client/client.cpp @@ -518,8 +518,6 @@ void CClient::SendInfo() { CMsgPacker Msg(NETMSG_INFO); Msg.AddString(GameClient()->NetVersion(), 128); - Msg.AddString(g_Config.m_PlayerName, 128); - Msg.AddString(g_Config.m_ClanName, 128); Msg.AddString(g_Config.m_Password, 128); SendMsgEx(&Msg, MSGFLAG_VITAL|MSGFLAG_FLUSH); } @@ -1175,7 +1173,6 @@ void CClient::ProcessPacket(CNetChunk *pPacket) { m_pConsole->Print(IConsole::OUTPUT_LEVEL_ADDINFO, "client/network", "loading done"); SendReady(); - GameClient()->OnConnected(); } else { @@ -1238,8 +1235,7 @@ void CClient::ProcessPacket(CNetChunk *pPacket) if(!pError) { m_pConsole->Print(IConsole::OUTPUT_LEVEL_ADDINFO, "client/network", "loading done"); - SendReady(); - GameClient()->OnConnected(); + SendReady(); } else DisconnectWithReason(pError); @@ -1261,6 +1257,10 @@ void CClient::ProcessPacket(CNetChunk *pPacket) } } } + else if(Msg == NETMSG_CON_READY) + { + GameClient()->OnConnected(); + } else if(Msg == NETMSG_PING) { CMsgPacker Msg(NETMSG_PING_REPLY); -- cgit 1.4.1