]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
For safety, restore previous behaviour (but only loop once) 440/head
authorMario <mario@smbclan.net>
Tue, 16 May 2017 11:34:25 +0000 (21:34 +1000)
committerMario <mario@smbclan.net>
Tue, 16 May 2017 11:34:25 +0000 (21:34 +1000)
qcsrc/server/race.qc

index 2668c3c896d0ffb7fbd2984035d425b54bc700bb..31edbc3f0d817c517cd3bd5b6b1d876eca375b19 100644 (file)
@@ -621,6 +621,15 @@ void checkpoint_passed(entity this, entity player)
                        cp_amount += 1;
                        if(it.race_checkpoint > largest_cp_id) // update the finish id if someone hit a new checkpoint
                        {
+                               if(!largest_cp_id)
+                               {
+                                       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;
+                                       });
+                               }
+
                                largest_cp_id = it.race_checkpoint;
                                IL_EACH(g_race_targets, it.classname == "target_stopTimer",
                                {
@@ -629,9 +638,6 @@ void checkpoint_passed(entity this, entity player)
                                race_highest_checkpoint = largest_cp_id + 1;
                                race_timed_checkpoint = largest_cp_id + 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)