Remove legacy code

The persistence enabled field was no longer needed a while ago, but never removed.
This commit is contained in:
Kawe Mazidjatari 2023-07-16 13:47:07 +02:00
parent e6eabc2cb8
commit a738e58985
2 changed files with 10 additions and 15 deletions

View File

@ -117,19 +117,17 @@ void CClient::Disconnect(const Reputation_t nRepLvl, const char* szReason, ...)
//---------------------------------------------------------------------------------
void CClient::VActivatePlayer(CClient* pClient)
{
pClient->SetPersistenceState(PERSISTENCE::PERSISTENCE_READY); // Set the client instance to 'ready'.
int nUserID = pClient->GetUserID();
if (!g_ServerPlayer[nUserID].m_bPersistenceEnabled && sv_showconnecting->GetBool())
{
g_ServerPlayer[nUserID].m_bPersistenceEnabled = true;
CNetChan* pNetChan = pClient->GetNetChan();
DevMsg(eDLL_T::SERVER, "Enabled persistence for client #%d; channel %s(%s) ('%llu')\n",
nUserID, pNetChan->GetName(), pNetChan->GetAddress(), pClient->GetNucleusID());
} ///////////////////////////////////////////////////////////////////////
// Set the client instance to 'ready' before calling ActivatePlayer.
pClient->SetPersistenceState(PERSISTENCE::PERSISTENCE_READY);
v_CClient_ActivatePlayer(pClient);
if (sv_showconnecting->GetBool())
{
const CNetChan* pNetChan = pClient->GetNetChan();
DevMsg(eDLL_T::SERVER, "Activated player #%d; channel %s(%s) ('%llu')\n",
pClient->GetUserID(), pNetChan->GetName(), pNetChan->GetAddress(), pClient->GetNucleusID());
}
}
//---------------------------------------------------------------------------------

View File

@ -17,7 +17,6 @@ struct ServerPlayer_t
, m_flLastNetProcessTime(0.0)
, m_flStringCommandQuotaTimeStart(0.0)
, m_nStringCommandQuotaCount(0)
, m_bPersistenceEnabled(false)
{}
inline void Reset(void)
{
@ -25,14 +24,12 @@ struct ServerPlayer_t
m_flLastNetProcessTime = 0.0;
m_flStringCommandQuotaTimeStart = 0.0;
m_nStringCommandQuotaCount = 0;
m_bPersistenceEnabled = false;
}
double m_flCurrentNetProcessTime;
double m_flLastNetProcessTime;
double m_flStringCommandQuotaTimeStart;
int m_nStringCommandQuotaCount;
bool m_bPersistenceEnabled;
};
extern ServerPlayer_t g_ServerPlayer[MAX_PLAYERS];