Get rid of fields which are now useless
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 2 Feb 2013 21:53:25 +0000 (23:53 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 2 Feb 2013 21:53:25 +0000 (23:53 +0200)
data/hudVT.cfg
data/qcsrc/client/hud.qc

index 81d869b..b4e9a4b 100644 (file)
@@ -1,5 +1,5 @@
 // Only some HUD components can be customized here at the time.\r
-// Components left to do: Portrait, Sbar ring, "HUD disabled" warnings, some race timers, some spectator messages,.\r
+// Components left to do: Strength / Shield timer, Portrait, Sbar ring, "HUD disabled" warnings, some race timers, some spectator messages,.\r
 \r
 set hud_panel_status_background_position "0 -0.85 0"\r
 set hud_panel_status_background_scale "0.2 0.15 0"\r
index 9b2d56e..01bd95a 100644 (file)
@@ -1876,22 +1876,14 @@ void Sbar_Portrait()
 void Sbar_Score()\r
 {\r
        float score, distribution, leader;\r
-       vector score_pos, secondary_score_pos, race_score_pos, distribution_color;\r
+       vector distribution_color;\r
        string racetime, secondary_racetime;\r
        entity tm, pl, me;\r
        me = (spectatee_status > 0) ? playerslots[spectatee_status - 1] : playerslots[player_localentnum - 1];\r
 \r
-       vector top;\r
-       top_x = vid_conwidth / 2;\r
-       top_y = 0;\r
-       top_z = 0;\r
-\r
        if(gametype == GAME_RPG)\r
                return;\r
 \r
-       score_pos = top + '-80 8 0';\r
-       secondary_score_pos = score_pos + '80 -6 0';\r
-\r
        if((scores_flags[ps_primary] & SFL_TIME) && !teamplay) { // race/cts record display on HUD\r
                pl = players.sort_next;\r
                if(pl == me)\r
@@ -1944,8 +1936,6 @@ void Sbar_Score()
                }\r
 \r
                racetime = strcat(s_racemin, " : ", s_racesec, " . ", s_racemsec);\r
-               race_score_pos = top + '0 0 0';\r
-               race_score_pos -= '1 0 0' * stringwidth(racetime, FALSE, '30 30 0') * 0.5;\r
                Sbar_DrawString(racetime, stov(cvar_string("hud_item_score_race_primary_text_position")), cvar("hud_item_score_race_primary_text_scale"));\r
 \r
        } else if (!teamplay) { // non-teamgames, except race/cts\r
@@ -2199,16 +2189,9 @@ void Sbar_Status()
 void Sbar_Timer()\r
 {\r
        float timelimit, elapsedTime, minutes, seconds, timeleft, minutesLeft, secondsLeft;\r
-       vector pos, bgpos, timer_color;\r
+       vector timer_color;\r
        string finaltime;\r
-       bgpos = '0 0 0';\r
-       \r
-       vector topright;\r
-       topright = '0 0 0';\r
-       topright_x = vid_conwidth;\r
-       \r
-       float scale;\r
-       scale = 1; // temporary\r
+\r
        timelimit = getstatf(STAT_TIMELIMIT);\r
 \r
        if(gametype == GAME_RPG && !timelimit) // don't draw the timer in rpg if there's no time limit\r
@@ -2237,24 +2220,18 @@ void Sbar_Timer()
                        minutes = floor(elapsedTime / 60);\r
                        seconds = elapsedTime - minutes*60;\r
                }\r
-               bgpos_x = topright_x - (70 + 17 + 12) * scale;\r
-               bgpos_y = 0;\r
-               bgpos_z = 0;\r
        } else {\r
                minutes = minutesLeft;\r
                seconds = secondsLeft;\r
-               bgpos_x = topright_x - (70 + 17 + 12) * scale;\r
-               bgpos_y = 0;\r
-               bgpos_z = 0;\r
        }\r
 \r
        if (cvar("viewsize") <= 100 && sbar_hudselector) { // draw timer background when viewsize <= 100\r
                if (teamplay)\r
-                       drawpic(bgpos, "gfx/hud/bg_timer", '120 30 0' * scale, GetTeamRGB(myteam) * sbar_color_bg_team, sbar_alpha_bg, DRAWFLAG_NORMAL); // timer bg color = myteam color\r
+                       drawpic('1 0 0' * (vid_conwidth - (70 + 17 + 12)), "gfx/hud/bg_timer", '120 30 0', GetTeamRGB(myteam) * sbar_color_bg_team, sbar_alpha_bg, DRAWFLAG_NORMAL); // timer bg color = myteam color\r
                else {\r
                        color = stov(cvar_string("sbar_color_bg"));\r
 \r
-                       drawpic(bgpos, "gfx/hud/bg_timer", '120 30 0' * scale, color, sbar_alpha_bg, DRAWFLAG_NORMAL);\r
+                       drawpic('1 0 0' * (vid_conwidth - (70 + 17 + 12)), "gfx/hud/bg_timer", '120 30 0', color, sbar_alpha_bg, DRAWFLAG_NORMAL);\r
                }\r
        }\r
 \r
@@ -2266,8 +2243,6 @@ void Sbar_Timer()
        else\r
                finaltime = strcat(finaltime, ftos(seconds));\r
 \r
-       pos = topright - ('24 -2 0' + '3 0 0' - '0 2 0');\r
-       pos -= '1 0 0' * stringwidth(finaltime, FALSE, 18 * scale * '1 1 0');\r
        drawstring(Sbar_ConvertToScreen_TextPosition(finaltime, stov(cvar_string("hud_item_timer_text_position")), cvar("hud_item_timer_text_scale")), finaltime, '1 1 0' * cvar("hud_item_timer_text_scale"), timer_color, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
 }\r
 \r