From 21507b51f1cc5c387fc699e01b1149081f5b8921 Mon Sep 17 00:00:00 2001 From: ChillerDragon Date: Sun, 11 Aug 2024 09:21:22 +0800 Subject: [PATCH] Send the new is ddnet message in 0.7 connections We already sent the legacy is ddnet message and so far the ddnet protocol over 0.7 seems to work fine. But for completeness and correctness it is now also sending the new ddnet version net message. --- src/engine/client/client.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp index 39f9c8677..857fec84e 100644 --- a/src/engine/client/client.cpp +++ b/src/engine/client/client.cpp @@ -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());