From: Mario Date: Tue, 16 May 2017 11:34:25 +0000 (+1000) Subject: For safety, restore previous behaviour (but only loop once) X-Git-Tag: xonotic-v0.8.5~2781^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=595b8c7a015b8c41a8180c8d08b1a0a2cdb89ecd;p=xonotic%2Fxonotic-data.pk3dir.git For safety, restore previous behaviour (but only loop once) --- diff --git a/qcsrc/server/race.qc b/qcsrc/server/race.qc index 2668c3c89..31edbc3f0 100644 --- a/qcsrc/server/race.qc +++ b/qcsrc/server/race.qc @@ -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)