removed some checks

This commit is contained in:
christian 2021-04-27 19:50:16 +02:00
parent ea6f79222b
commit 054ae4a60b

View File

@ -248,7 +248,7 @@ public void OnClientDisconnect(int client)
//---------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------
public void resetClient(int client) public void resetClient(int client)
{ {
if (IsClientConnected(client) && IsClientAuthorized(client)) if (0 < client <= MaxClients)
{ {
g_iClientChecking[client] = 0; g_iClientChecking[client] = 0;
g_bHumansAllowedTime[client] = false; g_bHumansAllowedTime[client] = false;
@ -322,7 +322,6 @@ public void OnPlayerRunCmdPost(int client, int buttons, int impulse, const float
} }
} }
g_fClientVectors[client] = clientVectors; g_fClientVectors[client] = clientVectors;
{
if (hText != INVALID_HANDLE && !g_bHideTimer[client]) if (hText != INVALID_HANDLE && !g_bHideTimer[client])
{ {
SetHudTextParams(0.35, 0.85, 0.1, 125, 255, 255, 85); SetHudTextParams(0.35, 0.85, 0.1, 125, 255, 255, 85);
@ -331,7 +330,6 @@ public void OnPlayerRunCmdPost(int client, int buttons, int impulse, const float
FormatPlayerTime(total_time, sTime, sizeof(sTime), false, 1); FormatPlayerTime(total_time, sTime, sizeof(sTime), false, 1);
ShowSyncHudText(client, hText, "%N Time: %s\nRecord: %s\nMap: %s\nCourse: %i", client, sTime, g_csTime_record[client], g_cMapname, player_stage[client]); ShowSyncHudText(client, hText, "%N Time: %s\nRecord: %s\nMap: %s\nCourse: %i", client, sTime, g_csTime_record[client], g_cMapname, player_stage[client]);
} }
}
g_iClientSpeedInterval[client]++; g_iClientSpeedInterval[client]++;
} }
g_iClientFrames[client]++; g_iClientFrames[client]++;
@ -349,12 +347,9 @@ public float client_current_race_time(int i_client)
//---------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------
public void resetClientVectors(int client) public void resetClientVectors(int client)
{ {
if (IsClientConnected(client) && IsClientAuthorized(client))
{
g_fClientVectors[client][0] = 0.000000; g_fClientVectors[client][0] = 0.000000;
g_fClientVectors[client][1] = 0.000000; g_fClientVectors[client][1] = 0.000000;
g_fClientVectors[client][2] = 0.000000; g_fClientVectors[client][2] = 0.000000;
}
} }
//---------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------
// Purpose: // Purpose: