case "bckills": return CTX(_("SCO^bckills"));
case "bctime": return CTX(_("SCO^bctime"));
case "caps": return CTX(_("SCO^caps"));
+ case "captime": return CTX(_("SCO^captime"));
case "deaths": return CTX(_("SCO^deaths"));
case "destroyed": return CTX(_("SCO^destroyed"));
case "drops": return CTX(_("SCO^drops"));
}
}
-void Cmd_HUD_Help(float argc)
+void Cmd_HUD_Help()
{
print(_("You can modify the scoreboard using the ^2scoreboard_columns_set command.\n"));
print(_("^3|---------------------------------------------------------------|\n"));
print(_("^3kd^7 The kill-death ratio\n"));
print(_("^3caps^7 How often a flag (CTF) or a key (KeyHunt) was captured\n"));
print(_("^3pickups^7 How often a flag (CTF) or a key (KeyHunt) or a ball (Keepaway) was picked up\n"));
+ print(_("^3captime^7 Time of fastest cap (CTF)\n"));
print(_("^3fckills^7 Number of flag carrier kills\n"));
print(_("^3returns^7 Number of flag returns\n"));
print(_("^3drops^7 Number of flag drops\n"));
float missing;
// TODO: re enable with gametype dependant cvars?
- if(argc < 2) // no arguments provided
+ if(argc < 3) // no arguments provided
argc = tokenizebyseparator(strcat("x ", autocvar_scoreboard_columns), " ");
- if(argc < 2)
+ if(argc < 3)
argc = tokenizebyseparator(strcat("x ", HUD_DefaultColumnLayout()), " ");
- if(argc == 2)
+ if(argc == 3)
{
- if(argv(1) == "default")
+ if(argv(2) == "default")
argc = tokenizebyseparator(strcat("x ", HUD_DefaultColumnLayout()), " ");
- else if(argv(1) == "all")
+ else if(argv(2) == "all")
{
string s;
- s = "ping pl color name |";
+ s = "ping pl name |";
for(i = 0; i < MAX_SCORE; ++i)
{
if(i != ps_primary)
hud_fontsize = HUD_GetFontsize("hud_fontsize");
+ draw_beginBoldFont();
for(i = 0; i < argc - 1; ++i)
{
float nocomplain;
}
hud_field[hud_num_fields] = SP_END;
+ draw_endBoldFont();
}
// MOVEUP::
}
// print the strings of the columns headers and draw the columns
+ draw_beginBoldFont();
for(i = 0; i < hud_num_fields; ++i)
{
if(hud_field[i] == SP_SEPARATOR)
pos_x -= hud_fontsize_x;
}
}
+ draw_endBoldFont();
pos_x = xmin;
pos_y += 1.25 * hud_fontsize_y; // skip the header
if (!acc_levels)
rgb = '1 1 1';
- else if (acc_col_x[0] == -1)
+ else if (acc_col[0] == '-1 0 0')
for (i = 0; i < acc_levels; ++i)
acc_col[i] = stov(cvar_string(strcat("accuracy_color", ftos(i))));
for(i = WEP_FIRST; i <= WEP_LAST; ++i)
{
self = get_weaponinfo(i);
- if not(self.weapons)
+ if not(self.weapon)
continue;
if ((i == WEP_NEX && g_minstagib) || i == WEP_PORTO || (i == WEP_MINSTANEX && !g_minstagib) || i == WEP_TUBA) // skip port-o-launch, nex || minstanex and tuba
continue;
// Heading
vector sb_heading_fontsize;
sb_heading_fontsize = hud_fontsize * 2;
+ draw_beginBoldFont();
drawstring(pos, _("Scoreboard"), sb_heading_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
+ draw_endBoldFont();
pos_y += sb_heading_fontsize_y + hud_fontsize_y * 0.25;
if(tm.team == COLOR_SPECTATOR)
continue;
+ draw_beginBoldFont();
rgb = GetTeamRGB(tm.team);
str = ftos(tm.(teamscores[ts_primary]));
drawstring(pos + team_score_baseoffset - eX * stringwidth(str, FALSE, hud_fontsize * 1.5), str, hud_fontsize * 1.5, rgb, scoreboard_alpha_fg, DRAWFLAG_NORMAL);
str = ftos(tm.(teamscores[ts_secondary]));
drawstring(pos + team_score_baseoffset - eX * stringwidth(str, FALSE, hud_fontsize) + eY * hud_fontsize_y * 1.5, str, hud_fontsize, rgb, scoreboard_alpha_fg, DRAWFLAG_NORMAL);
}
+ draw_endBoldFont();
+
pos = HUD_Scoreboard_MakeTable(pos, tm, rgb, bg_size);
}
}
if(specs)
{
+ draw_beginBoldFont();
drawstring(tmp, _("Spectators"), hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
+ draw_endBoldFont();
pos_y += 1.25 * hud_fontsize_y;
}
}
}
-
pos_y += 1.2 * hud_fontsize_y;
drawcolorcodedstring(pos + '0.5 0 0' * (sbwidth - stringwidth(str, TRUE, hud_fontsize)), str, hud_fontsize, scoreboard_alpha_fg, DRAWFLAG_NORMAL);
+ // print information about respawn status
+ float respawn_time = getstatf(STAT_RESPAWN_TIME);
+ if(respawn_time)
+ {
+ if(respawn_time < 0)
+ {
+ // a negative number means we are awaiting respawn, time value is still the same
+ respawn_time *= -1; // remove mark now that we checked it
+ str = strcat("^1Respawning in ^3", ftos_decimals(respawn_time - time, 2), "^1 seconds...");
+ }
+ else if(time < respawn_time)
+ str = strcat("You are dead, wait ^3", ftos_decimals(respawn_time - time, 2), "^7 seconds before respawning");
+ else if(time >= respawn_time)
+ str = strcat("You are dead, press ^2", getcommandkey("primary fire", "+fire"), "^7 to respawn");
+
+ pos_y += 1.2 * hud_fontsize_y;
+ drawcolorcodedstring(pos + '0.5 0 0' * (sbwidth - stringwidth(str, TRUE, hud_fontsize)), str, hud_fontsize, scoreboard_alpha_fg, DRAWFLAG_NORMAL);
+ }
+
scoreboard_bottom = pos_y + 2 * hud_fontsize_y;
}