From: z411 Date: Mon, 26 Oct 2020 05:41:40 +0000 (-0300) Subject: Fix frag_pos X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7626aa68e4a889ddd52d0e6414bdf9c4c45fc983;p=xonotic%2Fxonotic-data.pk3dir.git Fix frag_pos --- 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: