From: MirceaKitsune Date: Sat, 2 Feb 2013 21:16:21 +0000 (+0200) Subject: Adapt scores to the new HUD system. This only affects the score numbers displayed... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a9d13f1c02338c8819dbf8823174429d7eb9328a;p=voretournament%2Fvoretournament.git Adapt scores to the new HUD system. This only affects the score numbers displayed at the top of the screen by default, not the race timers or spectator messages --- diff --git a/data/hudVT.cfg b/data/hudVT.cfg index ac943e4d..b4d04088 100644 --- a/data/hudVT.cfg +++ b/data/hudVT.cfg @@ -1,9 +1,23 @@ // Only some HUD components can be customized here at the time. -// Components left to do: Timer, Scores, Portrait, Sbar ring, "HUD disabled" warnings. +// Components left to do: 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" +set hud_item_score_race_primary_text_position "0 0.95 0" +set hud_item_score_race_primary_text_scale 30 +set hud_item_score_race_secondary_text_position "-0.225 0.95 0" +set hud_item_score_race_secondary_text_scale 14 +set hud_item_score_team_primary_text_position "0 0.95 0" +set hud_item_score_team_primary_text_scale 34 +set hud_item_score_team_secondary_text_position "-0.2 0.965 0" +set hud_item_score_team_secondary_text_scale 16 +set hud_item_score_team_secondary_entry_spacing "0 -1.25 0" +set hud_item_score_nonteam_primary_text_position "0 0.95 0" +set hud_item_score_nonteam_primary_text_scale 34 +set hud_item_score_nonteam_secondary_text_position "-0.2 0.965 0" +set hud_item_score_nonteam_secondary_text_scale 16 + set hud_item_weapon_position "0 -0.85 0" set hud_item_weapon_scale "0.2 0.15 0" diff --git a/data/qcsrc/client/hud.qc b/data/qcsrc/client/hud.qc index 25aa1a85..1a3b65a9 100644 --- a/data/qcsrc/client/hud.qc +++ b/data/qcsrc/client/hud.qc @@ -1940,13 +1940,13 @@ void Sbar_Score() distribution_color = '1 1 1'; secondary_racetime = strcat(secondary_racetime, ftos(distsec), ".", ftos(distmsec)); - drawstring(score_pos + '222 0 0' - '14 0 0', secondary_racetime, '14 14 0', distribution_color, sbar_alpha_fg, DRAWFLAG_NORMAL); + drawstring(Sbar_ConvertToScreen_TextPosition(secondary_racetime, stov(cvar_string("hud_item_score_race_secondary_text_position")), cvar("hud_item_score_race_secondary_text_scale")), secondary_racetime, '1 1 0' * cvar("hud_item_score_race_secondary_text_scale"), distribution_color, sbar_alpha_fg, DRAWFLAG_NORMAL); } 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; - drawstring(race_score_pos, racetime, '30 30 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); + 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 // me vector := [team/connected frags id] @@ -1972,12 +1972,17 @@ void Sbar_Score() else distribution_color = '1 0 0'; - Sbar_DrawXNum(secondary_score_pos, distribution, 6, 3, 16, distribution_color, sbar_alpha_fg, DRAWFLAG_NORMAL); - Sbar_DrawXNum(score_pos, score, 6, 0, 34, distribution_color, sbar_alpha_fg, DRAWFLAG_NORMAL); + Sbar_DrawXNum(stov(cvar_string("hud_item_score_nonteam_secondary_text_position")), distribution, 6, 3, cvar("hud_item_score_nonteam_secondary_text_scale"), distribution_color, sbar_alpha_fg, DRAWFLAG_NORMAL); + Sbar_DrawXNum(stov(cvar_string("hud_item_score_nonteam_primary_text_position")), score, 6, 0, cvar("hud_item_score_nonteam_primary_text_scale"), distribution_color, sbar_alpha_fg, DRAWFLAG_NORMAL); } else { // teamgames float max_fragcount; max_fragcount = -999; + vector pos = stov(cvar_string("hud_item_score_team_secondary_text_position")); + vector sz = '1 1 0' * cvar("hud_item_score_team_secondary_text_scale"); + sz_x = sz_x / vid_conwidth; + sz_y = sz_y / vid_height * 2; + vector dir = stov(cvar_string("hud_item_score_team_secondary_entry_spacing")); for(tm = teams.sort_next; tm; tm = tm.sort_next) { if(tm.team == COLOR_SPECTATOR || !tm.team_size) // no players? don't display continue; @@ -1986,16 +1991,17 @@ void Sbar_Score() if (score > max_fragcount) max_fragcount = score; - + if(tm.team == myteam) { if (max_fragcount == score) leader = 1; - Sbar_DrawXNum(score_pos, score, 6, 0, 34, GetTeamRGB(tm.team), sbar_alpha_fg, DRAWFLAG_NORMAL); + Sbar_DrawXNum(stov(cvar_string("hud_item_score_team_primary_text_position")), score, 6, 0, cvar("hud_item_score_team_primary_text_scale"), GetTeamRGB(tm.team), sbar_alpha_fg, DRAWFLAG_NORMAL); } else { if (max_fragcount == score) leader = 1; - Sbar_DrawXNum(secondary_score_pos, score, 6, 3, 16, GetTeamRGB(tm.team), sbar_alpha_fg, DRAWFLAG_NORMAL); - secondary_score_pos = secondary_score_pos + '0 16 0'; + Sbar_DrawXNum(pos, score, 6, 3, cvar("hud_item_score_team_secondary_text_scale"), GetTeamRGB(tm.team), sbar_alpha_fg, DRAWFLAG_NORMAL); + pos_x += sz_x * dir_x; + pos_y += sz_y * dir_y; } } } diff --git a/docs/TODO.txt b/docs/TODO.txt index d74fbd16..6595fcf2 100644 --- a/docs/TODO.txt +++ b/docs/TODO.txt @@ -260,4 +260,12 @@ - 0.8: Tweak balance so that less damage is dealt and vore lasts more -- 0.8 BUG: When inside the stomach, the "Respawning in" field inside the scoreboard shouldn't keep resetting over and over again, and instead say something else +- 0.8 BUG: When inside the stomach, the "Respawning in" field inside the scoreboard shouldn't keep resetting over and over again, and instead say something else + +- 0.8 BUG (new HUD): HUD scores don't show any more because of the new positioning of DrawXNum, fix it + +- 0.8 (new HUD): Remove all position vectors left (topright, bottom, scorepos, etc) + +- 0.8: Smart hint system detecting gameplay errors client-side + +- 0.8: Make acceleration / deceleration play a role in swallow speed