]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
q3compat: allow triggering the finish line without triggering all checkpoints Juhu/q3_checkpoints
authorJuhu <5894800-Juhu_@users.noreply.gitlab.com>
Thu, 9 Feb 2023 12:07:50 +0000 (13:07 +0100)
committerJuhu <5894800-Juhu_@users.noreply.gitlab.com>
Thu, 9 Feb 2023 12:12:33 +0000 (13:12 +0100)
qcsrc/server/race.qc

index f8af3fc5f716c5ca12eb604c6f32ecd55c64d496..c856ccfb7e186157fb582fcdf2fcd23de73e37a7 100644 (file)
@@ -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;