]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Rank added to spects
authorz411 <z411@omaera.org>
Tue, 25 Jan 2022 18:58:54 +0000 (15:58 -0300)
committerz411 <z411@omaera.org>
Tue, 25 Jan 2022 18:58:54 +0000 (15:58 -0300)
qcsrc/client/hud/panel/scoreboard.qc

index a48219682c9de3fd7f4f765a731eb259b4b2c924..7e1d3071c051878bb5e4dadc3c44de38797d989f 100644 (file)
@@ -1134,7 +1134,11 @@ vector Scoreboard_DrawOthers(vector item_pos, vector rgb, int this_team, entity
                else if(autocvar_hud_panel_scoreboard_others_showscore)
                        field = Scoreboard_GetField(pl, SP_SCORE);
 
-               string str = entcs_GetName(pl.sv_entnum);
+               string str;
+               if(entcs_GetRank(pl.sv_entnum) != "")
+                       str = strcat(entcs_GetRank(pl.sv_entnum), "^7 ", entcs_GetName(pl.sv_entnum));
+               else
+                       str = entcs_GetName(pl.sv_entnum);
                if (autocvar_hud_panel_scoreboard_playerid)
                        str = Scoreboard_AddPlayerId(str, pl);
                str = textShortenToWidth(str, namesize, hud_fontsize, stringwidth_colors);