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:
bors[bot] 2020-06-20 09:13:45 +00:00 committed by GitHub
commit 14e6227ea0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View file

@ -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)
}
}

View file

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