X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fmenu%2Fxonotic%2Fplayerlist.c;h=315a68caa731b4c15657ca4e0d20c13b60814c60;hb=b2a0a591474681192b67caeb100f65ced41708b7;hp=f409a1b99df2742445a88bd1cfe1ea3b5f63ce2b;hpb=222228f3a13c61dd01668e201bfdfd437598ebe4;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/menu/xonotic/playerlist.c b/qcsrc/menu/xonotic/playerlist.c index f409a1b99..315a68caa 100644 --- a/qcsrc/menu/xonotic/playerlist.c +++ b/qcsrc/menu/xonotic/playerlist.c @@ -36,8 +36,6 @@ entity makeXonoticPlayerList() void XonoticPlayerList_setPlayerList(entity me, string plist) { - dprint(plist,"------------\n"); - float buf,i,n; string s; @@ -86,7 +84,7 @@ void XonoticPlayerList_resizeNotify(entity me, vector relOrigin, vector relSize, me.realUpperMargin = 0.5 * (1 - me.realFontSize_y); // this list does 1 char left and right margin - me.columnScoreSize = 3 * me.realFontSize_x; + me.columnScoreSize = 5 * me.realFontSize_x; me.columnNameSize = 1 - 3 * me.realFontSize_x - me.columnScoreSize; me.columnNameOrigin = me.realFontSize_x; @@ -110,14 +108,14 @@ void XonoticPlayerList_drawListBoxItem(entity me, float i, vector absSize, float else if(t == 4) rgb = colormapPaletteColor(9, 0); else - rgb = '1 1 1'; - + rgb = SKINCOLOR_TEXT; + s = me.getPlayerList(me, i, PLAYERPARM_NAME); score = me.getPlayerList(me, i, PLAYERPARM_SCORE); if(substring(score, strlen(score) - 10, 10) == ":spectator") { - score = "-666"; + score = _("spectator"); } else { @@ -125,6 +123,9 @@ void XonoticPlayerList_drawListBoxItem(entity me, float i, vector absSize, float score = substring(score, 0, t); if((t = strstrofs(score, ",", 0)) >= 0) score = substring(score, 0, t); + + if(stof(score) == -666) + score = _("spectator"); } s = draw_TextShortenToWidth(s, me.columnNameSize, 1, me.realFontSize);