From: Mario Date: Sat, 13 May 2017 01:20:16 +0000 (+1000) Subject: Tweak it further by not doing another loop within the loop X-Git-Tag: xonotic-v0.8.5~2781^2~2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=bf0341297967fc125a4c568a9969696cd406438b;p=xonotic%2Fxonotic-data.pk3dir.git Tweak it further by not doing another loop within the loop --- 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)