From bf0341297967fc125a4c568a9969696cd406438b Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 13 May 2017 11:20:16 +1000 Subject: [PATCH] Tweak it further by not doing another loop within the loop --- qcsrc/server/race.qc | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/qcsrc/server/race.qc b/qcsrc/server/race.qc index 93fb93ffe..2668c3c89 100644 --- a/qcsrc/server/race.qc +++ b/qcsrc/server/race.qc @@ -628,13 +628,10 @@ void checkpoint_passed(entity this, entity player) }); race_highest_checkpoint = largest_cp_id + 1; race_timed_checkpoint = largest_cp_id + 1; - - IL_EACH(g_race_targets, it.classname == "target_checkpoint", - { - if(it.race_checkpoint == -2) // set defragcpexists to -1 so that the cp id file will be rewritten when someone finishes - defragcpexists = -1; - }); } + + if(it.race_checkpoint == -2) // set defragcpexists to -1 so that the cp id file will be rewritten when someone finishes + defragcpexists = -1; }); if(!cp_amount) -- 2.39.2