pos_y = 16;
pos_z = 0;*/
- //drawpic(pos, "gfx/finale", '0 0 0', '1 1 1', hud_alpha_fg, DRAWFLAG_NORMAL);
+ //drawpic(pos, "gfx/finale", '0 0 0', '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
//drawstring(pos, "END", hud_fontsize, '1 1 1', 1, DRAWFLAG_NORMAL);
MapVote_Draw();
void Cmd_HUD_Help(float argc)
{
- print("You can modify the scoreboard using the ^2hud_columns_set command.\n");
+ print("You can modify the scoreboard using the ^2scoreboard_columns_set command.\n");
print("^3|---------------------------------------------------------------|\n");
print("Usage:\n");
- print("^2hud_columns_set default\n");
- print("^2hud_columns_set ^7filed1 field2 ...\n");
+ print("^2scoreboard_columns_set default\n");
+ print("^2scoreboard_columns_set ^7filed1 field2 ...\n");
print("The following field names are recognized (case insensitive):\n");
print("You can use a ^3|^7 to start the right-aligned fields.\n\n");
print("The special game type names 'teams' and 'noteams' can be used to\n");
print("include/exclude ALL teams/noteams game modes.\n\n");
- print("Example: hud_columns_set name ping pl | +ctf/field3 -dm/field4\n");
+ print("Example: scoreboard_columns_set name ping pl | +ctf/field3 -dm/field4\n");
print("will display name, ping and pl aligned to the left, and the fields\n");
print("right of the vertical bar aligned to the right.\n");
print("'field3' will only be shown in CTF, and 'field4' will be shown in all\n");
// TODO: re enable with gametype dependant cvars?
if(argc < 2) // no arguments provided
- argc = tokenizebyseparator(strcat("x ", cvar_string("hud_columns")), " ");
+ argc = tokenizebyseparator(strcat("x ", cvar_string("scoreboard_columns")), " ");
if(argc < 2)
argc = tokenizebyseparator(strcat("x ", HUD_DefaultColumnLayout()), " ");
is_spec = (GetPlayerColor(pl.sv_entnum) == COLOR_SPECTATOR);
if((rgb == '1 1 1') && (!is_spec)) {
- rgb_x = cvar("hud_color_bg_r") + 0.5;
- rgb_y = cvar("hud_color_bg_g") + 0.5;
- rgb_z = cvar("hud_color_bg_b") + 0.5; }
+ rgb_x = cvar("scoreboard_color_bg_r") + 0.5;
+ rgb_y = cvar("scoreboard_color_bg_g") + 0.5;
+ rgb_z = cvar("scoreboard_color_bg_b") + 0.5; }
// Layout:
tmp_x = sbwidth;
float fontsize = 40 * 1/3;
float weapon_cnt = 12;
float rows;
- if(cvar("hud_accuracy_doublerows"))
+ if(cvar("scoreboard_accuracy_doublerows"))
rows = 2;
else
rows = 1;
weapon_alpha = 0.2 * scoreboard_alpha_fg;
// weapon icon
- drawpic(pos, strcat("gfx/weapons/weapon", self.netname), '1 0 0' * sbwidth * (1/weapon_cnt) + '0 1 0' * height * (2/3), '1 1 1', weapon_alpha, DRAWFLAG_NORMAL);
+ drawpic(pos, strcat("gfx/hud/", cvar_string("hud_skin"), "/weapon", self.netname), '1 0 0' * sbwidth * (1/weapon_cnt) + '0 1 0' * height * (2/3), '1 1 1', weapon_alpha, DRAWFLAG_NORMAL);
// the accuracy
if(weapon_damage) {
weapons_with_stats += 1;
float is_spec;
is_spec = (GetPlayerColor(pl.sv_entnum) == COLOR_SPECTATOR);
vector hl_rgb;
- hl_rgb_x = cvar("hud_color_bg_r") + 0.5;
- hl_rgb_y = cvar("hud_color_bg_g") + 0.5;
- hl_rgb_z = cvar("hud_color_bg_b") + 0.5;
+ hl_rgb_x = cvar("scoreboard_color_bg_r") + 0.5;
+ hl_rgb_y = cvar("scoreboard_color_bg_g") + 0.5;
+ hl_rgb_z = cvar("scoreboard_color_bg_b") + 0.5;
pos_y += hud_fontsize_y;
drawstring(pos, strcat("Rankings"), hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
if not(scoreboard_fade_alpha)
return;
- scoreboard_alpha_bg = cvar("scoreboard_alpha_bg") * scoreboard_fade_alpha;
- scoreboard_alpha_fg = cvar_or("scoreboard_alpha_fg", 1.0) * scoreboard_fade_alpha;
+ scoreboard_alpha_bg = cvar("scoreboard_alpha_bg") * scoreboard_fade_alpha * (1 - cvar("_menu_alpha"));
+ scoreboard_alpha_fg = cvar_or("scoreboard_alpha_fg", 1.0) * scoreboard_fade_alpha * (1 - cvar("_menu_alpha"));
scoreboard_highlight = cvar("scoreboard_highlight");
scoreboard_highlight_alpha = cvar_or("scoreboard_highlight_alpha", 0.10) * scoreboard_alpha_fg;
scoreboard_highlight_alpha_self = cvar_or("scoreboard_highlight_alpha_self", 0.25) * scoreboard_alpha_fg;
}
else
{
- rgb_x = cvar("hud_color_bg_r");
- rgb_y = cvar("hud_color_bg_g");
- rgb_z = cvar("hud_color_bg_b");
+ rgb_x = cvar("scoreboard_color_bg_r");
+ rgb_y = cvar("scoreboard_color_bg_g");
+ rgb_z = cvar("scoreboard_color_bg_b");
for(tm = teams.sort_next; tm; tm = tm.sort_next)
{
}
pos = HUD_DrawScoreboardRankings(pos, pl, rgb, bg_size);
}
- else if(cvar("hud_accuracy") && spectatee_status != -1) {
+ else if(cvar("scoreboard_accuracy") && spectatee_status != -1) {
if(teamplay)
pos = HUD_DrawScoreboardAccuracyStats(pos, GetTeamRGB(myteam), bg_size);
else
void HUD_DrawAccuracyStats_Description_Hitscan(vector position)
{
- drawstring(position + '0 3 0' * hud_fontsize_y, "Shots fired:", hud_fontsize, '1 1 1', hud_alpha_fg, DRAWFLAG_NORMAL);
- drawstring(position + '0 5 0' * hud_fontsize_y, "Shots hit:", hud_fontsize, '1 1 1', hud_alpha_fg, DRAWFLAG_NORMAL);
- drawstring(position + '0 7 0' * hud_fontsize_y, "Accuracy:", hud_fontsize, '1 1 1', hud_alpha_fg, DRAWFLAG_NORMAL);
- drawstring(position + '0 9 0' * hud_fontsize_y, "Shots missed:", hud_fontsize, '1 1 1', hud_alpha_fg, DRAWFLAG_NORMAL);
+ drawstring(position + '0 3 0' * hud_fontsize_y, "Shots fired:", hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
+ drawstring(position + '0 5 0' * hud_fontsize_y, "Shots hit:", hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
+ drawstring(position + '0 7 0' * hud_fontsize_y, "Accuracy:", hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
+ drawstring(position + '0 9 0' * hud_fontsize_y, "Shots missed:", hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
}
void HUD_DrawAccuracyStats_Description_Splash(vector position)
{
- drawstring(position + '0 3 0' * hud_fontsize_y, "Maximum damage:", hud_fontsize, '1 1 1', hud_alpha_fg, DRAWFLAG_NORMAL);
- drawstring(position + '0 5 0' * hud_fontsize_y, "Actual damage:", hud_fontsize, '1 1 1', hud_alpha_fg, DRAWFLAG_NORMAL);
- drawstring(position + '0 7 0' * hud_fontsize_y, "Accuracy:", hud_fontsize, '1 1 1', hud_alpha_fg, DRAWFLAG_NORMAL);
- drawstring(position + '0 9 0' * hud_fontsize_y, "Damage wasted:", hud_fontsize, '1 1 1', hud_alpha_fg, DRAWFLAG_NORMAL);
+ drawstring(position + '0 3 0' * hud_fontsize_y, "Maximum damage:", hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
+ drawstring(position + '0 5 0' * hud_fontsize_y, "Actual damage:", hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
+ drawstring(position + '0 7 0' * hud_fontsize_y, "Accuracy:", hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
+ drawstring(position + '0 9 0' * hud_fontsize_y, "Damage wasted:", hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
}
void HUD_DrawAccuracyStats()
pos_x = 0;
pos_y = SCOREBOARD_OFFSET;
pos_z = 0;
- drawstringcenter(pos, "Weapon Accuracy", 2 * hud_fontsize, '1 1 1', hud_alpha_fg, DRAWFLAG_NORMAL);
+ drawstringcenter(pos, "Weapon Accuracy", 2 * hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
left_border = col_margin + 11 * hud_fontsize_x;
{
pos_y += 40;
if(mod(time, 1) >= 0.4)
- drawstringcenter(pos, "Stats are not tracked during warmup stage", hud_fontsize, '1 1 0', hud_alpha_fg, DRAWFLAG_NORMAL);
+ drawstringcenter(pos, "Stats are not tracked during warmup stage", hud_fontsize, '1 1 0', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
return;
}
{
pos_y += 40;
if(mod(time, 1) >= 0.4)
- drawstringcenter(pos, "Stats are not tracked in Race/CTS", hud_fontsize, '1 1 0', hud_alpha_fg, DRAWFLAG_NORMAL);
+ drawstringcenter(pos, "Stats are not tracked in Race/CTS", hud_fontsize, '1 1 0', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
return;
}
pos_y = top_border_splash + row * (fill_size_y + row_margin);
// background
- drawpic(pos, "gfx/scoreboard/accuracy_bg", fill_size , fill_colour, hud_alpha_bg, DRAWFLAG_NORMAL);
- drawborderlines(hud_border_thickness, pos, fill_size, border_colour, hud_alpha_bg, DRAWFLAG_NORMAL);
+ drawpic(pos, "gfx/scoreboard/accuracy_bg", fill_size , fill_colour, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
+ drawborderlines(hud_border_thickness, pos, fill_size, border_colour, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
// the weapon
- drawpic(pos, strcat("gfx/weapons/weapon", self.netname), '1 0.5 0' * fill_size_x , '1 1 1', hud_alpha_fg, DRAWFLAG_NORMAL);
+ drawpic(pos, strcat("gfx/weapons/weapon", self.netname), '1 0.5 0' * fill_size_x , '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
// the amount of shots fired or max damage
- drawstringright(pos + '4.5 0 0' * hud_fontsize_x + '0 3 0' * hud_fontsize_y, ftos(weapon_damage), hud_fontsize, '1 1 1', hud_alpha_fg, DRAWFLAG_NORMAL);
+ drawstringright(pos + '4.5 0 0' * hud_fontsize_x + '0 3 0' * hud_fontsize_y, ftos(weapon_damage), hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
// the amount of hits or actual damage
- drawstringright(pos + '4.5 0 0' * hud_fontsize_x + '0 5 0' * hud_fontsize_y, ftos(weapon_hit), hud_fontsize, '1 1 1', hud_alpha_fg, DRAWFLAG_NORMAL);
+ drawstringright(pos + '4.5 0 0' * hud_fontsize_x + '0 5 0' * hud_fontsize_y, ftos(weapon_hit), hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
// the accuracy
- drawstringright(pos + '4.5 0 0' * hud_fontsize_x + '0 7 0' * hud_fontsize_y, strcat(ftos(weapon_stats),"%"), hud_fontsize, '1 1 1', hud_alpha_fg, DRAWFLAG_NORMAL);
+ drawstringright(pos + '4.5 0 0' * hud_fontsize_x + '0 7 0' * hud_fontsize_y, strcat(ftos(weapon_stats),"%"), hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
// the amount of shots missed or damage wasted
- drawstringright(pos + '4.5 0 0' * hud_fontsize_x + '0 9 0' * hud_fontsize_y, ftos(max(0, weapon_damage - weapon_hit)), hud_fontsize, '1 1 1', hud_alpha_fg, DRAWFLAG_NORMAL);
+ drawstringright(pos + '4.5 0 0' * hud_fontsize_x + '0 9 0' * hud_fontsize_y, ftos(max(0, weapon_damage - weapon_hit)), hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
++count_splash;
} else if (self.spawnflags & WEP_TYPE_HITSCAN) {
pos_y = top_border_hitscan + row * (fill_size_y + row_margin);
// background
- drawpic(pos, "gfx/scoreboard/accuracy_bg", fill_size , fill_colour, hud_alpha_bg, DRAWFLAG_NORMAL);
- drawborderlines(hud_border_thickness, pos, fill_size, border_colour, hud_alpha_bg, DRAWFLAG_NORMAL);
+ drawpic(pos, "gfx/scoreboard/accuracy_bg", fill_size , fill_colour, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
+ drawborderlines(hud_border_thickness, pos, fill_size, border_colour, scoreboard_alpha_bg, DRAWFLAG_NORMAL);
// the weapon
- drawpic(pos, strcat("gfx/weapons/weapon", self.netname), '1 0.5 0' * fill_size_x , '1 1 1', hud_alpha_fg, DRAWFLAG_NORMAL);
+ drawpic(pos, strcat("gfx/weapons/weapon", self.netname), '1 0.5 0' * fill_size_x , '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
// the amount of shots fired or max damage
- drawstringright(pos + '4.5 0 0' * hud_fontsize_x + '0 3 0' * hud_fontsize_y, ftos(weapon_damage), hud_fontsize, '1 1 1', hud_alpha_fg, DRAWFLAG_NORMAL);
+ drawstringright(pos + '4.5 0 0' * hud_fontsize_x + '0 3 0' * hud_fontsize_y, ftos(weapon_damage), hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
// the amount of hits or actual damage
- drawstringright(pos + '4.5 0 0' * hud_fontsize_x + '0 5 0' * hud_fontsize_y, ftos(weapon_hit), hud_fontsize, '1 1 1', hud_alpha_fg, DRAWFLAG_NORMAL);
+ drawstringright(pos + '4.5 0 0' * hud_fontsize_x + '0 5 0' * hud_fontsize_y, ftos(weapon_hit), hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
// the accuracy
- drawstringright(pos + '4.5 0 0' * hud_fontsize_x + '0 7 0' * hud_fontsize_y, strcat(ftos(weapon_stats),"%"), hud_fontsize, '1 1 1', hud_alpha_fg, DRAWFLAG_NORMAL);
+ drawstringright(pos + '4.5 0 0' * hud_fontsize_x + '0 7 0' * hud_fontsize_y, strcat(ftos(weapon_stats),"%"), hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
// the amount of shots missed or damage wasted
- drawstringright(pos + '4.5 0 0' * hud_fontsize_x + '0 9 0' * hud_fontsize_y, ftos(max(0, weapon_damage - weapon_hit)), hud_fontsize, '1 1 1', hud_alpha_fg, DRAWFLAG_NORMAL);
+ drawstringright(pos + '4.5 0 0' * hud_fontsize_x + '0 9 0' * hud_fontsize_y, ftos(max(0, weapon_damage - weapon_hit)), hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
++count_hitscan;
}