mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Merge #2286
2286: Times are no longer negative in 0.7 r=def- a=Learath2 Co-authored-by: Learath <learath2@gmail.com>
This commit is contained in:
commit
14e6227ea0
|
@ -1987,7 +1987,7 @@ void CServer::CacheServerInfoSixup(CCache *pCache, bool SendClients)
|
|||
Packer.AddString(ClientName(i), MAX_NAME_LENGTH); // client name
|
||||
Packer.AddString(ClientClan(i), MAX_CLAN_LENGTH); // client clan
|
||||
Packer.AddInt(m_aClients[i].m_Country); // client country
|
||||
Packer.AddInt(m_aClients[i].m_Score); // client score
|
||||
Packer.AddInt(m_aClients[i].m_Score == -9999 ? -1 : -m_aClients[i].m_Score); // client score
|
||||
Packer.AddInt(GameServer()->IsClientPlayer(i)?0:1); // flag spectator=1, bot=2 (player=0)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -346,8 +346,6 @@ void CPlayer::Snap(int SnappingClient)
|
|||
// send 0 if times of others are not shown
|
||||
if(SnappingClient != m_ClientID && g_Config.m_SvHideScore)
|
||||
Score = -9999;
|
||||
else
|
||||
Score = abs(m_Score) * -1;
|
||||
|
||||
if(!Server()->IsSixup(SnappingClient))
|
||||
{
|
||||
|
@ -373,7 +371,7 @@ void CPlayer::Snap(int SnappingClient)
|
|||
pPlayerInfo->m_PlayerFlags = PlayerFlags_SixToSeven(m_PlayerFlags);
|
||||
if(Server()->ClientAuthed(m_ClientID))
|
||||
pPlayerInfo->m_PlayerFlags |= protocol7::PLAYERFLAG_ADMIN;
|
||||
pPlayerInfo->m_Score = Score;
|
||||
pPlayerInfo->m_Score = Score == -9999 ? -1 : -Score;
|
||||
pPlayerInfo->m_Latency = Latency;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue