Persist show_ips setting on map changes

This commit is contained in:
def 2019-04-29 21:39:14 +02:00
parent d8964ceedb
commit a910d9eff7

View file

@ -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();