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"));
vr = GetPlayerColor(right.sv_entnum);
if(!left.gotscores)
- vl = COLOR_SPECTATOR;
+ vl = FL_SPECTATOR;
if(!right.gotscores)
- vr = COLOR_SPECTATOR;
+ vr = FL_SPECTATOR;
if(vl > vr)
return true;
if(vl < vr)
return false;
- if(vl == COLOR_SPECTATOR)
+ if(vl == FL_SPECTATOR)
{
// FIRST the one with scores (spectators), THEN the ones without (downloaders)
// no other sorting
{
float vl, vr;
- if(left.team == COLOR_SPECTATOR)
+ if(left.team == FL_SPECTATOR)
return 1;
- if(right.team == COLOR_SPECTATOR)
+ if(right.team == FL_SPECTATOR)
return 0;
vl = left.teamscores[ts_primary];
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"));
// TODO: re enable with gametype dependant cvars?
if(argc < 3) // no arguments provided
- argc = tokenizebyseparator(strcat("x ", autocvar_scoreboard_columns), " ");
+ argc = tokenizebyseparator(strcat("0 1 ", autocvar_scoreboard_columns), " ");
if(argc < 3)
- argc = tokenizebyseparator(strcat("x ", HUD_DefaultColumnLayout()), " ");
+ argc = tokenizebyseparator(strcat("0 1 ", HUD_DefaultColumnLayout()), " ");
if(argc == 3)
{
if(argv(2) == "default")
- argc = tokenizebyseparator(strcat("x ", HUD_DefaultColumnLayout()), " ");
+ argc = tokenizebyseparator(strcat("0 1 ", HUD_DefaultColumnLayout()), " ");
else if(argv(2) == "all")
{
string s;
if(ps_secondary != ps_primary)
s = strcat(s, " ", scores_label[ps_secondary]);
s = strcat(s, " ", scores_label[ps_primary]);
- argc = tokenizebyseparator(strcat("x ", s), " ");
+ argc = tokenizebyseparator(strcat("0 1 ", s), " ");
}
}
hud_num_fields = 0;
- hud_fontsize = HUD_GetFontsize("hud_fontsize");
+ hud_fontsize = HUD_GetFontsize("hud_fontsize");
draw_beginBoldFont();
- for(i = 0; i < argc - 1; ++i)
+ for(i = 1; i < argc - 1; ++i)
{
float nocomplain;
str = argv(i+1);
void HUD_PrintScoreboardItem(vector pos, entity pl, float is_self, float pl_number)
{
vector tmp, rgb;
- rgb = GetTeamRGB(pl.team);
+ rgb = Team_ColorRGB(pl.team);
string str;
float i, field;
float is_spec;
- is_spec = (GetPlayerColor(pl.sv_entnum) == COLOR_SPECTATOR);
+ is_spec = (GetPlayerColor(pl.sv_entnum) == FL_SPECTATOR);
if((rgb == '1 1 1') && (!is_spec)) {
rgb_x = autocvar_scoreboard_color_bg_r + 0.5;
else
for(pl = players.sort_next; pl; pl = pl.sort_next)
{
- if(pl.team == COLOR_SPECTATOR)
+ if(pl.team == FL_SPECTATOR)
continue;
HUD_PrintScoreboardItem(pos, pl, (pl.sv_entnum == player_localnum), i);
pos_y += 1.25 * hud_fontsize_y;
return pos;
float is_spec;
- is_spec = (GetPlayerColor(pl.sv_entnum) == COLOR_SPECTATOR);
+ is_spec = (GetPlayerColor(pl.sv_entnum) == FL_SPECTATOR);
vector hl_rgb;
hl_rgb_x = autocvar_scoreboard_color_bg_r + 0.5;
hl_rgb_y = autocvar_scoreboard_color_bg_g + 0.5;
team_score_baseoffset = eY * (2 * autocvar_scoreboard_border_thickness + hud_fontsize_y) - eX * (autocvar_scoreboard_border_thickness + hud_fontsize_x * 0.25);
for(tm = teams.sort_next; tm; tm = tm.sort_next)
{
- if(tm.team == COLOR_SPECTATOR)
+ if(tm.team == FL_SPECTATOR)
continue;
draw_beginBoldFont();
- rgb = GetTeamRGB(tm.team);
+ rgb = Team_ColorRGB(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);
for(tm = teams.sort_next; tm; tm = tm.sort_next)
{
- if(tm.team == COLOR_SPECTATOR)
+ if(tm.team == FL_SPECTATOR)
continue;
pos = HUD_Scoreboard_MakeTable(pos, tm, rgb, bg_size);
}
else if(autocvar_scoreboard_accuracy && spectatee_status != -1 && !warmup_stage) {
if(teamplay)
- pos = HUD_DrawScoreboardAccuracyStats(pos, GetTeamRGB(myteam), bg_size);
+ pos = HUD_DrawScoreboardAccuracyStats(pos, Team_ColorRGB(myteam), bg_size);
else
pos = HUD_DrawScoreboardAccuracyStats(pos, rgb, bg_size);
}
if(teamplay)
- pos = HUD_DrawMapStats(pos, GetTeamRGB(myteam), bg_size);
+ pos = HUD_DrawMapStats(pos, Team_ColorRGB(myteam), bg_size);
else
pos = HUD_DrawMapStats(pos, rgb, bg_size);
tmp = pos;
for(pl = players.sort_next; pl; pl = pl.sort_next)
{
- if(pl.team != COLOR_SPECTATOR)
+ if(pl.team != FL_SPECTATOR)
continue;
pos_y += 1.25 * hud_fontsize_y;
HUD_PrintScoreboardItem(pos, pl, (pl.sv_entnum == player_localnum), specs);
}
}
-
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
+ if(time >= respawn_time) // don't show a negative value while the server is respawning the player (lag)
+ str = _("^1Respawning...");
+ else
+ str = sprintf(_("^1Respawning in ^3%s^1 seconds..."), ftos_decimals(respawn_time - time, autocvar_scoreboard_respawntime_decimals));
+ }
+ else if(time < respawn_time)
+ str = sprintf(_("You are dead, wait ^3%s^7 seconds before respawning"), ftos_decimals(respawn_time - time, autocvar_scoreboard_respawntime_decimals));
+ else if(time >= respawn_time)
+ str = sprintf(_("You are dead, press ^2%s^7 to respawn"), getcommandkey("jump", "+jump"));
+
+ 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;
}