return pos;
}
+string Scoreboard_Fraglimit_Draw(float limit, bool is_leadlimit)
+{
+ string s_label = (teamplay) ? teamscores_label(ts_primary) : scores_label(ps_primary);
+ int s_flags = (teamplay) ? teamscores_flags(ts_primary) : scores_flags(ps_primary);
+ return sprintf((is_leadlimit ? _("^2+%s %s") : _("^5%s %s")), ScoreString(s_flags, limit),
+ (s_label == "score") ? CTX(_("SCO^points")) :
+ (s_label == "fastest") ? "" : TranslateScoresLabel(s_label));
+}
+
void Scoreboard_Draw()
{
if(!autocvar__hud_configure)
{
if(tl > 0)
str = strcat(str, "^7 / "); // delimiter
- if(teamplay)
- {
- str = strcat(str, sprintf(_("^5%s %s"), ScoreString(teamscores_flags(ts_primary), fl),
- (teamscores_label(ts_primary) == "score") ? CTX(_("SCO^points")) :
- (teamscores_label(ts_primary) == "fastest") ? "" :
- TranslateScoresLabel(teamscores_label(ts_primary))));
- }
- else
- {
- str = strcat(str, sprintf(_("^5%s %s"), ScoreString(scores_flags(ps_primary), fl),
- (scores_label(ps_primary) == "score") ? CTX(_("SCO^points")) :
- (scores_label(ps_primary) == "fastest") ? "" :
- TranslateScoresLabel(scores_label(ps_primary))));
- }
+ str = strcat(str, Scoreboard_Fraglimit_Draw(fl, false));
}
if(ll > 0)
{
else
str = strcat(str, "^7 / ");
}
-
- if(teamplay)
- {
- str = strcat(str, sprintf(_("^2+%s %s"), ScoreString(teamscores_flags(ts_primary), ll),
- (teamscores_label(ts_primary) == "score") ? CTX(_("SCO^points")) :
- (teamscores_label(ts_primary) == "fastest") ? "" :
- TranslateScoresLabel(teamscores_label(ts_primary))));
- }
- else
- {
- str = strcat(str, sprintf(_("^2+%s %s"), ScoreString(scores_flags(ps_primary), ll),
- (scores_label(ps_primary) == "score") ? CTX(_("SCO^points")) :
- (scores_label(ps_primary) == "fastest") ? "" :
- TranslateScoresLabel(scores_label(ps_primary))));
- }
+ str = strcat(str, Scoreboard_Fraglimit_Draw(ll, true));
}
}
drawcolorcodedstring(pos + '1 0 0' * (panel_size.x - stringwidth(str, true, sb_gameinfo_detail_fontsize)), str, sb_gameinfo_detail_fontsize, panel_fg_alpha, DRAWFLAG_NORMAL); // align right