From 6db72b2388cb4b7b0546bffb9500fd324977c66a Mon Sep 17 00:00:00 2001 From: Learath Date: Sat, 20 Jun 2020 11:53:44 +0300 Subject: [PATCH] Times are no longer negative in 0.7 --- src/engine/server/server.cpp | 2 +- src/game/server/player.cpp | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/engine/server/server.cpp b/src/engine/server/server.cpp index ca39b66a3..b5a173642 100644 --- a/src/engine/server/server.cpp +++ b/src/engine/server/server.cpp @@ -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) } } diff --git a/src/game/server/player.cpp b/src/game/server/player.cpp index 463abcbe9..3c205480f 100644 --- a/src/game/server/player.cpp +++ b/src/game/server/player.cpp @@ -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; }