Cleanup to use new ConVar utilities

This commit is contained in:
Amos
2022-01-09 17:17:05 +01:00
parent 19f5010bd2
commit 64c07af6e0
13 changed files with 49 additions and 49 deletions

View File

@@ -18,7 +18,7 @@ bool HIVEngineServer_PersistenceAvailable(void* entidx, int clientidx)
CClient* pClient = g_pClient->GetClientInstance(clientidx); // Get client instance.
*(char*)((std::uintptr_t)pClient + g_dwPersistenceVar) = (char)0x5; // Set the client instance to 'ready'.
if (!g_bIsPersistenceVarSet[clientidx] && sv_showconnecting->m_pParent->m_iValue > 0)
if (!g_bIsPersistenceVarSet[clientidx] && sv_showconnecting->GetBool())
{
void* clientNamePtr = (void**)(((std::uintptr_t)pClient->GetNetChan()) + 0x1A8D); // Get client name from netchan.
std::string clientName((char*)clientNamePtr, 32); // Get full name.

View File

@@ -44,7 +44,7 @@ void* HCServer_Authenticate(void* pServer, user_creds* pInpacket)
svIpAddress = ss.str();
}
if (sv_showconnecting->m_pParent->m_iValue > 0)
if (sv_showconnecting->GetBool())
{
DevMsg(eDLL_T::SERVER, "\n");
DevMsg(eDLL_T::SERVER, "______________________________________________________________\n");
@@ -61,7 +61,7 @@ void* HCServer_Authenticate(void* pServer, user_creds* pInpacket)
{
CServer_RejectConnection(pServer, *(unsigned int*)((std::uintptr_t)pServer + 0xC), pInpacket, "You have been banned from this Server."); // RejectConnection for the client.
if (sv_showconnecting->m_pParent->m_iValue > 0)
if (sv_showconnecting->GetBool())
{
DevMsg(eDLL_T::SERVER, "] NOTICE : | THIS CLIENT IS BANNED!\n");
DevMsg(eDLL_T::SERVER, "--------------------------------------------------------------\n\n");
@@ -69,7 +69,7 @@ void* HCServer_Authenticate(void* pServer, user_creds* pInpacket)
return nullptr;
}
}
if (sv_showconnecting->m_pParent->m_iValue > 0)
if (sv_showconnecting->GetBool())
{
DevMsg(eDLL_T::SERVER, "\n");
}