3642: Forgot to actually send Sv_RecordLegacy to old clients r=def- a=heinrich5991

<!-- What is the motivation for the changes of this pull request -->

## Checklist

- [x] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
This commit is contained in:
bors[bot] 2021-02-24 22:49:38 +00:00 committed by GitHub
commit 3d86c76e5f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3722,10 +3722,15 @@ void CGameContext::OnSetAuthed(int ClientID, int Level)
void CGameContext::SendRecord(int ClientID)
{
CNetMsg_Sv_Record RecordsMsg;
RecordsMsg.m_PlayerTimeBest = Score()->PlayerData(ClientID)->m_BestTime * 100.0f;
RecordsMsg.m_ServerTimeBest = m_pController->m_CurrentRecord * 100.0f; //TODO: finish this
Server()->SendPackMsg(&RecordsMsg, MSGFLAG_VITAL, ClientID);
CNetMsg_Sv_Record Msg;
CNetMsg_Sv_RecordLegacy MsgLegacy;
MsgLegacy.m_PlayerTimeBest = Msg.m_PlayerTimeBest = Score()->PlayerData(ClientID)->m_BestTime * 100.0f;
MsgLegacy.m_ServerTimeBest = Msg.m_ServerTimeBest = m_pController->m_CurrentRecord * 100.0f; //TODO: finish this
Server()->SendPackMsg(&Msg, MSGFLAG_VITAL, ClientID);
if(!Server()->IsSixup(ClientID) && GetClientVersion(ClientID) < VERSION_DDNET_MSG_LEGACY)
{
Server()->SendPackMsg(&MsgLegacy, MSGFLAG_VITAL, ClientID);
}
}
int CGameContext::ProcessSpamProtection(int ClientID)