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`.
This commit is contained in:
heinrich5991 2021-02-12 00:31:51 +01:00
parent e1448bebc7
commit f199b5101f
2 changed files with 3 additions and 3 deletions

View file

@ -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"),
]),

View file

@ -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;