]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix frag_pos
authorz411 <z411@omaera.org>
Mon, 26 Oct 2020 05:41:40 +0000 (02:41 -0300)
committerz411 <z411@omaera.org>
Mon, 26 Oct 2020 05:41:40 +0000 (02:41 -0300)
qcsrc/common/notifications/all.qh

index 8044ee93cfbb4c8d75b586f28dd4de29bc3bc664..bbea2f112a25ff7c4026f9447d8a88b426146608 100644 (file)
@@ -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: