X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Fscoreboard.qc;h=83991f6f1cb49e9a66eb80170f9488282944a97c;hb=64b6c7420b3e1c307f408a9f17d9c765a268621a;hp=41ac0a72771bb38a466f0e16a291062ff8b4b387;hpb=04852fe26cf701d01c27af9c1b551815ddb2e30e;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/scoreboard.qc b/qcsrc/client/scoreboard.qc index 41ac0a727..83991f6f1 100644 --- a/qcsrc/client/scoreboard.qc +++ b/qcsrc/client/scoreboard.qc @@ -311,15 +311,15 @@ void Cmd_HUD_SetFields(float argc) // 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; @@ -334,17 +334,17 @@ void Cmd_HUD_SetFields(float argc) 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); @@ -1379,21 +1379,22 @@ void HUD_DrawScoreboard() // print information about respawn status float respawn_time = getstatf(STAT_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(respawn_time - time > 0) - str = strcat("^1Respawning in ^3", ftos_decimals(respawn_time - time, 2), "^1 seconds..."); - else - respawn_time = 0; // don't show a negative value while the server is respawning the player - } - 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"); 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); }