]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Adapt scores to the new HUD system. This only affects the score numbers displayed...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 2 Feb 2013 21:16:21 +0000 (23:16 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 2 Feb 2013 21:16:21 +0000 (23:16 +0200)
data/hudVT.cfg
data/qcsrc/client/hud.qc
docs/TODO.txt

index ac943e4d81c8258956924d704b8b0bcfa9a302c9..b4d0408879a7713c3c99942bcef85296bd4bca72 100644 (file)
@@ -1,9 +1,23 @@
 // Only some HUD components can be customized here at the time.\r
-// Components left to do: Timer, Scores, Portrait, Sbar ring, "HUD disabled" warnings.\r
+// Components left to do: 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
 \r
+set hud_item_score_race_primary_text_position "0 0.95 0"\r
+set hud_item_score_race_primary_text_scale 30\r
+set hud_item_score_race_secondary_text_position "-0.225 0.95 0"\r
+set hud_item_score_race_secondary_text_scale 14\r
+set hud_item_score_team_primary_text_position "0 0.95 0"\r
+set hud_item_score_team_primary_text_scale 34\r
+set hud_item_score_team_secondary_text_position "-0.2 0.965 0"\r
+set hud_item_score_team_secondary_text_scale 16\r
+set hud_item_score_team_secondary_entry_spacing "0 -1.25 0"\r
+set hud_item_score_nonteam_primary_text_position "0 0.95 0"\r
+set hud_item_score_nonteam_primary_text_scale 34\r
+set hud_item_score_nonteam_secondary_text_position "-0.2 0.965 0"\r
+set hud_item_score_nonteam_secondary_text_scale 16\r
+\r
 set hud_item_weapon_position "0 -0.85 0"\r
 set hud_item_weapon_scale "0.2 0.15 0"\r
 \r
index 25aa1a8521036fbe58eed95ad21ada7132c5c992..1a3b65a9bd9bfad2824f1381240ff45b5ef407e8 100644 (file)
@@ -1940,13 +1940,13 @@ void Sbar_Score()
                                distribution_color = '1 1 1';\r
 \r
                        secondary_racetime = strcat(secondary_racetime, ftos(distsec), ".", ftos(distmsec));\r
-                       drawstring(score_pos + '222 0 0' - '14 0 0', secondary_racetime, '14 14 0', distribution_color, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+                       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);\r
                }\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
-               drawstring(race_score_pos, racetime, '30 30 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\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
                // me vector := [team/connected frags id]\r
@@ -1972,12 +1972,17 @@ void Sbar_Score()
                else\r
                        distribution_color = '1 0 0';\r
                \r
-               Sbar_DrawXNum(secondary_score_pos, distribution, 6, 3, 16, distribution_color, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
-               Sbar_DrawXNum(score_pos, score, 6, 0, 34, distribution_color, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+               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);\r
+               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);\r
        } else { // teamgames\r
                float max_fragcount;\r
                max_fragcount = -999;\r
 \r
+               vector pos = stov(cvar_string("hud_item_score_team_secondary_text_position"));\r
+               vector sz = '1 1 0' * cvar("hud_item_score_team_secondary_text_scale");\r
+               sz_x = sz_x / vid_conwidth;\r
+               sz_y = sz_y / vid_height * 2;\r
+               vector dir = stov(cvar_string("hud_item_score_team_secondary_entry_spacing"));\r
                for(tm = teams.sort_next; tm; tm = tm.sort_next) {\r
                        if(tm.team == COLOR_SPECTATOR || !tm.team_size) // no players? don't display\r
                                continue;\r
@@ -1986,16 +1991,17 @@ void Sbar_Score()
 \r
                        if (score > max_fragcount)\r
                                max_fragcount = score;\r
-       \r
+\r
                        if(tm.team == myteam) {\r
                                if (max_fragcount == score)\r
                                        leader = 1;\r
-                               Sbar_DrawXNum(score_pos, score, 6, 0, 34, GetTeamRGB(tm.team), sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+                               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);\r
                        } else {\r
                                if (max_fragcount == score)\r
                                        leader = 1;\r
-                               Sbar_DrawXNum(secondary_score_pos, score, 6, 3, 16, GetTeamRGB(tm.team), sbar_alpha_fg, DRAWFLAG_NORMAL);\r
-                               secondary_score_pos = secondary_score_pos + '0 16 0';\r
+                               Sbar_DrawXNum(pos, score, 6, 3, cvar("hud_item_score_team_secondary_text_scale"), GetTeamRGB(tm.team), sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+                               pos_x += sz_x * dir_x;\r
+                               pos_y += sz_y * dir_y;\r
                        }\r
                }\r
        }\r
index d74fbd16491c9ad7e5cde5a252cfd0247494423b..6595fcf289968dffb7698518f2b9f075b0a61c2c 100644 (file)
 \r
 - 0.8: Tweak balance so that less damage is dealt and vore lasts more\r
 \r
-- 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\r
+\r
+- 0.8 BUG (new HUD): HUD scores don't show any more because of the new positioning of DrawXNum, fix it\r
+\r
+- 0.8 (new HUD): Remove all position vectors left (topright, bottom, scorepos, etc)
+\r
+- 0.8: Smart hint system detecting gameplay errors client-side\r
+\r
+- 0.8: Make acceleration / deceleration play a role in swallow speed\r