[PlayerManager] Allow to disable authcheck via cvar (-1.0)

This commit is contained in:
zaCade 2023-12-23 12:18:43 +01:00
parent 5c0bc9340f
commit 567921451a

View File

@ -260,7 +260,11 @@ public EConnect OnClientPreConnectEx(const char[] sName, char sPassword[255], co
//----------------------------------------------------------------------------------------------------
public void OnClientPutInServer(int client)
{
CreateTimer(g_hCvar_AuthenticationTime.FloatValue, CheckAuth, GetClientSerial(client), TIMER_FLAG_NO_MAPCHANGE);
float fAuthenticationTime = g_hCvar_AuthenticationTime.FloatValue;
if (fAuthenticationTime == -1.0)
return;
CreateTimer(fAuthenticationTime, CheckAuth, GetClientSerial(client), TIMER_FLAG_NO_MAPCHANGE);
}
//----------------------------------------------------------------------------------------------------