From: Juhu <5894800-Juhu_@users.noreply.gitlab.com> Date: Thu, 9 Feb 2023 12:07:50 +0000 (+0100) Subject: q3compat: allow triggering the finish line without triggering all checkpoints X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=refs%2Fheads%2FJuhu%2Fq3_checkpoints;p=xonotic%2Fxonotic-data.pk3dir.git q3compat: allow triggering the finish line without triggering all checkpoints --- diff --git a/qcsrc/server/race.qc b/qcsrc/server/race.qc index f8af3fc5f..c856ccfb7 100644 --- a/qcsrc/server/race.qc +++ b/qcsrc/server/race.qc @@ -736,7 +736,7 @@ void checkpoint_passed(entity this, entity player) } } - if((player.race_checkpoint == -1 && this.race_checkpoint == 0) || (player.race_checkpoint == this.race_checkpoint)) + if((player.race_checkpoint == -1 && this.race_checkpoint == 0) || (player.race_checkpoint == this.race_checkpoint) || (q3compat && this.race_checkpoint == race_timed_checkpoint && player.race_checkpoint > 0)) { if(this.race_penalty) { @@ -825,7 +825,9 @@ bool race_waypointsprite_visible_for_player(entity this, entity player, entity v if(this.realowner) own = this.realowner; // target support - if(view.race_checkpoint == -1 || own.race_checkpoint == -2) + if(q3compat && own.race_checkpoint == race_timed_checkpoint && player.race_checkpoint > 0) + return true; + else if(view.race_checkpoint == -1 || own.race_checkpoint == -2) return true; else if(view.race_checkpoint == own.race_checkpoint) return true;