Merge pull request #7277 from furo321/send-ping-menu

Send the player's latency if a menu is open
This commit is contained in:
Dennis Felsing 2023-10-01 22:19:50 +00:00 committed by GitHub
commit 879a88933c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -286,6 +286,9 @@ void CPlayer::Tick()
void CPlayer::PostTick() void CPlayer::PostTick()
{ {
// update latency value // update latency value
if(m_PlayerFlags & PLAYERFLAG_IN_MENU)
m_aCurLatency[m_ClientID] = GameServer()->m_apPlayers[m_ClientID]->m_Latency.m_Min;
if(m_PlayerFlags & PLAYERFLAG_SCOREBOARD) if(m_PlayerFlags & PLAYERFLAG_SCOREBOARD)
{ {
for(int i = 0; i < MAX_CLIENTS; ++i) for(int i = 0; i < MAX_CLIENTS; ++i)