1691: Persist show_ips setting on map changes r=Learath2 a=def-

@12pm 

Co-authored-by: def <dennis@felsin9.de>
This commit is contained in:
bors[bot] 2019-05-01 12:08:13 +00:00
commit 9bca330a73

View file

@ -257,7 +257,6 @@ void CServer::CClient::Reset()
m_Score = 0; m_Score = 0;
m_NextMapChunk = 0; m_NextMapChunk = 0;
m_Flags = 0; m_Flags = 0;
m_ShowIps = false;
} }
CServer::CServer() CServer::CServer()
@ -472,6 +471,7 @@ int CServer::Init()
m_aClients[i].m_Snapshots.Init(); m_aClients[i].m_Snapshots.Init();
m_aClients[i].m_Traffic = 0; m_aClients[i].m_Traffic = 0;
m_aClients[i].m_TrafficSince = 0; m_aClients[i].m_TrafficSince = 0;
m_aClients[i].m_ShowIps = false;
m_aClients[i].m_AuthKey = -1; 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_AuthKey = -1;
pThis->m_aClients[ClientID].m_AuthTries = 0; pThis->m_aClients[ClientID].m_AuthTries = 0;
pThis->m_aClients[ClientID].m_pRconCmdToSend = 0; pThis->m_aClients[ClientID].m_pRconCmdToSend = 0;
pThis->m_aClients[ClientID].m_ShowIps = false;
pThis->m_aClients[ClientID].Reset(); pThis->m_aClients[ClientID].Reset();
pThis->SendMap(ClientID); 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_pRconCmdToSend = 0;
pThis->m_aClients[ClientID].m_Traffic = 0; pThis->m_aClients[ClientID].m_Traffic = 0;
pThis->m_aClients[ClientID].m_TrafficSince = 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)); memset(&pThis->m_aClients[ClientID].m_Addr, 0, sizeof(NETADDR));
pThis->m_aClients[ClientID].Reset(); pThis->m_aClients[ClientID].Reset();
pThis->GameServer()->OnClientEngineJoin(ClientID); 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_pRconCmdToSend = 0;
pThis->m_aClients[ClientID].m_Traffic = 0; pThis->m_aClients[ClientID].m_Traffic = 0;
pThis->m_aClients[ClientID].m_TrafficSince = 0; pThis->m_aClients[ClientID].m_TrafficSince = 0;
pThis->m_aClients[ClientID].m_ShowIps = false;
pThis->m_aPrevStates[ClientID] = CClient::STATE_EMPTY; pThis->m_aPrevStates[ClientID] = CClient::STATE_EMPTY;
pThis->m_aClients[ClientID].m_Snapshots.PurgeAll(); pThis->m_aClients[ClientID].m_Snapshots.PurgeAll();