]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Tweak it further by not doing another loop within the loop
authorMario <mario@smbclan.net>
Sat, 13 May 2017 01:20:16 +0000 (11:20 +1000)
committerMario <mario@smbclan.net>
Sat, 13 May 2017 01:20:16 +0000 (11:20 +1000)
qcsrc/server/race.qc

index 93fb93ffefae0215a6e71ca3934584566e23a78c..2668c3c896d0ffb7fbd2984035d425b54bc700bb 100644 (file)
@@ -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)