Merge pull request #8708 from ChillerDragon/pr_07_modern_is_ddnet_msg

Send the new is ddnet message in 0.7 connections
This commit is contained in:
Dennis Felsing 2024-08-11 22:12:00 +00:00 committed by GitHub
commit 960d2853bc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -210,6 +210,12 @@ int CClient::SendMsgActive(CMsgPacker *pMsg, int Flags)
void CClient::SendInfo(int Conn)
{
CMsgPacker MsgVer(NETMSG_CLIENTVER, true);
MsgVer.AddRaw(&m_ConnectionId, sizeof(m_ConnectionId));
MsgVer.AddInt(GameClient()->DDNetVersion());
MsgVer.AddString(GameClient()->DDNetVersionStr());
SendMsg(Conn, &MsgVer, MSGFLAG_VITAL);
if(IsSixup())
{
CMsgPacker Msg(NETMSG_INFO, true);
@ -219,11 +225,6 @@ void CClient::SendInfo(int Conn)
SendMsg(Conn, &Msg, MSGFLAG_VITAL | MSGFLAG_FLUSH);
return;
}
CMsgPacker MsgVer(NETMSG_CLIENTVER, true);
MsgVer.AddRaw(&m_ConnectionId, sizeof(m_ConnectionId));
MsgVer.AddInt(GameClient()->DDNetVersion());
MsgVer.AddString(GameClient()->DDNetVersionStr());
SendMsg(Conn, &MsgVer, MSGFLAG_VITAL);
CMsgPacker Msg(NETMSG_INFO, true);
Msg.AddString(GameClient()->NetVersion());