From 347b45ca91bd135ad468a4560bab0ea6ae98192c Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Sat, 2 Feb 2013 23:53:25 +0200 Subject: [PATCH] Get rid of fields which are now useless --- data/hudVT.cfg | 2 +- data/qcsrc/client/hud.qc | 35 +++++------------------------------ 2 files changed, 6 insertions(+), 31 deletions(-) diff --git a/data/hudVT.cfg b/data/hudVT.cfg index 81d869b1..b4e9a4b6 100644 --- a/data/hudVT.cfg +++ b/data/hudVT.cfg @@ -1,5 +1,5 @@ // Only some HUD components can be customized here at the time. -// Components left to do: Portrait, Sbar ring, "HUD disabled" warnings, some race timers, some spectator messages,. +// Components left to do: Strength / Shield timer, Portrait, Sbar ring, "HUD disabled" warnings, some race timers, some spectator messages,. set hud_panel_status_background_position "0 -0.85 0" set hud_panel_status_background_scale "0.2 0.15 0" diff --git a/data/qcsrc/client/hud.qc b/data/qcsrc/client/hud.qc index 9b2d56e2..01bd95a8 100644 --- a/data/qcsrc/client/hud.qc +++ b/data/qcsrc/client/hud.qc @@ -1876,22 +1876,14 @@ void Sbar_Portrait() void Sbar_Score() { float score, distribution, leader; - vector score_pos, secondary_score_pos, race_score_pos, distribution_color; + vector distribution_color; string racetime, secondary_racetime; entity tm, pl, me; me = (spectatee_status > 0) ? playerslots[spectatee_status - 1] : playerslots[player_localentnum - 1]; - vector top; - top_x = vid_conwidth / 2; - top_y = 0; - top_z = 0; - if(gametype == GAME_RPG) return; - score_pos = top + '-80 8 0'; - secondary_score_pos = score_pos + '80 -6 0'; - if((scores_flags[ps_primary] & SFL_TIME) && !teamplay) { // race/cts record display on HUD pl = players.sort_next; if(pl == me) @@ -1944,8 +1936,6 @@ void Sbar_Score() } racetime = strcat(s_racemin, " : ", s_racesec, " . ", s_racemsec); - race_score_pos = top + '0 0 0'; - race_score_pos -= '1 0 0' * stringwidth(racetime, FALSE, '30 30 0') * 0.5; Sbar_DrawString(racetime, stov(cvar_string("hud_item_score_race_primary_text_position")), cvar("hud_item_score_race_primary_text_scale")); } else if (!teamplay) { // non-teamgames, except race/cts @@ -2199,16 +2189,9 @@ void Sbar_Status() void Sbar_Timer() { float timelimit, elapsedTime, minutes, seconds, timeleft, minutesLeft, secondsLeft; - vector pos, bgpos, timer_color; + vector timer_color; string finaltime; - bgpos = '0 0 0'; - - vector topright; - topright = '0 0 0'; - topright_x = vid_conwidth; - - float scale; - scale = 1; // temporary + timelimit = getstatf(STAT_TIMELIMIT); if(gametype == GAME_RPG && !timelimit) // don't draw the timer in rpg if there's no time limit @@ -2237,24 +2220,18 @@ void Sbar_Timer() minutes = floor(elapsedTime / 60); seconds = elapsedTime - minutes*60; } - bgpos_x = topright_x - (70 + 17 + 12) * scale; - bgpos_y = 0; - bgpos_z = 0; } else { minutes = minutesLeft; seconds = secondsLeft; - bgpos_x = topright_x - (70 + 17 + 12) * scale; - bgpos_y = 0; - bgpos_z = 0; } if (cvar("viewsize") <= 100 && sbar_hudselector) { // draw timer background when viewsize <= 100 if (teamplay) - 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 + 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 else { color = stov(cvar_string("sbar_color_bg")); - drawpic(bgpos, "gfx/hud/bg_timer", '120 30 0' * scale, color, sbar_alpha_bg, DRAWFLAG_NORMAL); + drawpic('1 0 0' * (vid_conwidth - (70 + 17 + 12)), "gfx/hud/bg_timer", '120 30 0', color, sbar_alpha_bg, DRAWFLAG_NORMAL); } } @@ -2266,8 +2243,6 @@ void Sbar_Timer() else finaltime = strcat(finaltime, ftos(seconds)); - pos = topright - ('24 -2 0' + '3 0 0' - '0 2 0'); - pos -= '1 0 0' * stringwidth(finaltime, FALSE, 18 * scale * '1 1 0'); 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); } -- 2.39.2