From 7626aa68e4a889ddd52d0e6414bdf9c4c45fc983 Mon Sep 17 00:00:00 2001 From: z411 Date: Mon, 26 Oct 2020 02:41:40 -0300 Subject: [PATCH] Fix frag_pos --- qcsrc/common/notifications/all.qh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/qcsrc/common/notifications/all.qh b/qcsrc/common/notifications/all.qh index 8044ee93c..bbea2f112 100644 --- a/qcsrc/common/notifications/all.qh +++ b/qcsrc/common/notifications/all.qh @@ -491,17 +491,20 @@ string notif_arg_frag_pos(int score) bool tied = false; for(pl = players.sort_next; pl; pl = pl.sort_next) { - if(pl.team == NUM_SPECTATOR) continue; + if(pl.team != NUM_SPECTATOR) continue; if(pl.(scores(SP_SCORE)) == score) break; ++place; } entity prev = pl.sort_prev; entity next = pl.sort_next; - if(prev && prev.(scores(SP_SCORE)) == score) + if(prev && prev.(scores(SP_SCORE)) == score) { tied = true; - if(next && next.(scores(SP_SCORE)) == score) + --place; // We're tied always for the best place + } + if(next && next.(scores(SP_SCORE)) == score) { tied = true; + } switch(place) { case 1: -- 2.39.2