From a910d9eff7113c4e5ddada46713383f1a4e1babb Mon Sep 17 00:00:00 2001 From: def Date: Mon, 29 Apr 2019 21:39:14 +0200 Subject: [PATCH] Persist show_ips setting on map changes --- src/engine/server/server.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/engine/server/server.cpp b/src/engine/server/server.cpp index f34e37472..e7cc84098 100644 --- a/src/engine/server/server.cpp +++ b/src/engine/server/server.cpp @@ -257,7 +257,6 @@ void CServer::CClient::Reset() m_Score = 0; m_NextMapChunk = 0; m_Flags = 0; - m_ShowIps = false; } CServer::CServer() @@ -472,6 +471,7 @@ int CServer::Init() m_aClients[i].m_Snapshots.Init(); m_aClients[i].m_Traffic = 0; m_aClients[i].m_TrafficSince = 0; + m_aClients[i].m_ShowIps = false; m_aClients[i].m_AuthKey = -1; } @@ -847,6 +847,7 @@ int CServer::NewClientNoAuthCallback(int ClientID, void *pUser) pThis->m_aClients[ClientID].m_AuthKey = -1; pThis->m_aClients[ClientID].m_AuthTries = 0; pThis->m_aClients[ClientID].m_pRconCmdToSend = 0; + pThis->m_aClients[ClientID].m_ShowIps = false; pThis->m_aClients[ClientID].Reset(); pThis->SendMap(ClientID); @@ -871,6 +872,7 @@ int CServer::NewClientCallback(int ClientID, void *pUser) pThis->m_aClients[ClientID].m_pRconCmdToSend = 0; pThis->m_aClients[ClientID].m_Traffic = 0; pThis->m_aClients[ClientID].m_TrafficSince = 0; + pThis->m_aClients[ClientID].m_ShowIps = false; memset(&pThis->m_aClients[ClientID].m_Addr, 0, sizeof(NETADDR)); pThis->m_aClients[ClientID].Reset(); pThis->GameServer()->OnClientEngineJoin(ClientID); @@ -950,6 +952,7 @@ int CServer::DelClientCallback(int ClientID, const char *pReason, void *pUser) pThis->m_aClients[ClientID].m_pRconCmdToSend = 0; pThis->m_aClients[ClientID].m_Traffic = 0; pThis->m_aClients[ClientID].m_TrafficSince = 0; + pThis->m_aClients[ClientID].m_ShowIps = false; pThis->m_aPrevStates[ClientID] = CClient::STATE_EMPTY; pThis->m_aClients[ClientID].m_Snapshots.PurgeAll();