From 5a406acc6edc9bfaae6a1b3c45c52cea82c3886e Mon Sep 17 00:00:00 2001 From: jenzur Date: Sun, 5 Apr 2020 00:56:20 +0200 Subject: [PATCH] fixing up update check --- RaceTimer/scripting/unloze_racetimer_redux.sp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/RaceTimer/scripting/unloze_racetimer_redux.sp b/RaceTimer/scripting/unloze_racetimer_redux.sp index b1f787ab..8ac6d082 100644 --- a/RaceTimer/scripting/unloze_racetimer_redux.sp +++ b/RaceTimer/scripting/unloze_racetimer_redux.sp @@ -431,11 +431,12 @@ public void FinishedStageRaceZone(int client) { //no start zone, we use round time CPrintToChat(client, "{green}[UNLOZE] Client: %N Time: 0%i:%.4f", client, g_iRoundMinutes, g_fRoundSeconds); - if ((g_iRoundMinutes < minutes) || (g_iRoundMinutes == minutes && g_fRoundSeconds > leftover_seconds) - || (minutes == 0.0 && leftover_seconds == 0.0)) - { + if (g_iRoundMinutes < minutes) + sendMYSQL(client, g_iRoundMinutes, g_fRoundSeconds, player_stage[client]); + else if (g_iRoundMinutes == minutes && g_fRoundSeconds > leftover_seconds) + sendMYSQL(client, g_iRoundMinutes, g_fRoundSeconds, player_stage[client]); + else if (minutes == 0.0 && leftover_seconds == 0.0) sendMYSQL(client, g_iRoundMinutes, g_fRoundSeconds, player_stage[client]); - } } else { @@ -445,11 +446,12 @@ public void FinishedStageRaceZone(int client) //tricking ppl !hehe CPrintToChat(client, "{green}[UNLOZE] Stage: %i", player_stage[client]); CPrintToChat(client, "{green}[UNLOZE] Client: %N Time: 0%i:%.4f", client, l_iCalculateMins, l_fCalculateSecs); - if ((l_iCalculateMins < minutes) || (l_iCalculateMins == minutes && l_fCalculateSecs > leftover_seconds) - || (minutes == 0.0 && leftover_seconds == 0.0)) - { + if (l_iCalculateMins < minutes) + sendMYSQL(client, l_iCalculateMins, l_fCalculateSecs, player_stage[client]); + else if (l_iCalculateMins == minutes && l_fCalculateSecs > leftover_seconds) + sendMYSQL(client, l_iCalculateMins, l_fCalculateSecs, player_stage[client]); + else if (minutes == 0.0 && leftover_seconds == 0.0) sendMYSQL(client, l_iCalculateMins, l_fCalculateSecs, player_stage[client]); - } } } //----------------------------------------------------------------------------------------------------