mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Merge #3642
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:
commit
3d86c76e5f
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue