From f199b5101f0775b2e4aba08fd9d1d61c180c606d Mon Sep 17 00:00:00 2001 From: heinrich5991 Date: Fri, 12 Feb 2021 00:31:51 +0100 Subject: [PATCH] Change record message to record@netmsg.ddnet.tw Now that I understand that the message is still in use, rename it from `weird-record@netmsg.ddnet.tw`. --- datasrc/network.py | 2 +- src/game/client/components/hud.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/datasrc/network.py b/datasrc/network.py index b201781a4..b049c603a 100644 --- a/datasrc/network.py +++ b/datasrc/network.py @@ -469,7 +469,7 @@ Messages = [ NetIntRange("m_Finish", 0, 1), ]), - NetMessageEx("Sv_Record", "weird-record@netmsg.ddnet.tw", [ + NetMessageEx("Sv_Record", "record@netmsg.ddnet.tw", [ NetIntAny("m_ServerTimeBest"), NetIntAny("m_PlayerTimeBest"), ]), diff --git a/src/game/client/components/hud.cpp b/src/game/client/components/hud.cpp index dec77c5b0..b092534e5 100644 --- a/src/game/client/components/hud.cpp +++ b/src/game/client/components/hud.cpp @@ -882,7 +882,7 @@ void CHud::OnMessage(int MsgType, void *pRawMsg) CNetMsg_Sv_Record *pMsg = (CNetMsg_Sv_Record *)pRawMsg; // NETMSGTYPE_SV_RACETIME on old race servers - if(GameClient()->m_GameInfo.m_DDRaceRecordMessage) + if(MsgType == NETMSGTYPE_SV_RECORDLEGACY && GameClient()->m_GameInfo.m_DDRaceRecordMessage) { m_DDRaceTimeReceived = true; @@ -896,7 +896,7 @@ void CHud::OnMessage(int MsgType, void *pRawMsg) m_CheckpointTick = Client()->GameTick(g_Config.m_ClDummy); } } - else if(GameClient()->m_GameInfo.m_RaceRecordMessage) + else if(MsgType == NETMSGTYPE_SV_RECORD || GameClient()->m_GameInfo.m_RaceRecordMessage) { m_ServerRecord = (float)pMsg->m_ServerTimeBest / 100; m_PlayerRecord[g_Config.m_ClDummy] = (float)pMsg->m_PlayerTimeBest / 100;