From b391c0391598ea991409c0ddfbf4abb09d3fda51 Mon Sep 17 00:00:00 2001 From: terencehill Date: Wed, 2 Aug 2017 13:03:22 +0200 Subject: [PATCH] Clean up HUD_Mod_Race a little bit --- qcsrc/client/hud/panel/modicons.qc | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/qcsrc/client/hud/panel/modicons.qc b/qcsrc/client/hud/panel/modicons.qc index e8464cc14..03ab7a425 100644 --- a/qcsrc/client/hud/panel/modicons.qc +++ b/qcsrc/client/hud/panel/modicons.qc @@ -513,10 +513,8 @@ void race_showTime(string text, vector pos, vector timeText_ofs, float theTime, void HUD_Mod_Race(vector pos, vector mySize) { - entity me; - me = playerslots[player_localnum]; - float score; - score = me.(scores(ps_primary)); + entity me = playerslots[player_localnum]; + float score = me.(scores(ps_primary)); if(!(scores_flags(ps_primary) & SFL_TIME) || teamplay) // race/cts record display on HUD { @@ -589,24 +587,15 @@ void HUD_Mod_Race(vector pos, vector mySize) } // race "awards" - float a; - a = bound(0, race_status_time - time, 1); + float a = bound(0, race_status_time - time, 1); + string s = textShortenToWidth(ColorTranslateRGB(race_status_name), squareSize, '1 1 0' * 0.1 * squareSize, stringwidth_colors); - string s; - s = textShortenToWidth(ColorTranslateRGB(race_status_name), squareSize, '1 1 0' * 0.1 * squareSize, stringwidth_colors); - - float rank; + float rank = 0; if(race_status > 0) rank = race_CheckName(race_status_name); - else - rank = 0; - string rankname; - rankname = count_ordinal(rank); - - vector namepos; - namepos = medalPos + '0 0.8 0' * squareSize; - vector rankpos; - rankpos = medalPos + '0 0.15 0' * squareSize; + string rankname = count_ordinal(rank); + vector namepos = medalPos + '0 0.8 0' * squareSize; + vector rankpos = medalPos + '0 0.15 0' * squareSize; if(race_status == 0) drawpic_aspect_skin(medalPos, "race_newfail", '1 1 0' * squareSize, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL); -- 2.39.2