From: terencehill Date: Mon, 15 Aug 2016 10:35:09 +0000 (+0200) Subject: Show nothing instead of "Respawning in 0 seconds" when server is respawning the playe... X-Git-Tag: xonotic-v0.8.2~713 X-Git-Url: https://de.git.xonotic.org/?a=commitdiff_plain;h=9a461d4b0f6476eddd347aa5cd40adae0eefc26e;p=xonotic%2Fxonotic-data.pk3dir.git Show nothing instead of "Respawning in 0 seconds" when server is respawning the player (it happens only for a few frames) --- diff --git a/qcsrc/client/hud/panel/scoreboard.qc b/qcsrc/client/hud/panel/scoreboard.qc index 57af737c5..2e5fd9431 100644 --- a/qcsrc/client/hud/panel/scoreboard.qc +++ b/qcsrc/client/hud/panel/scoreboard.qc @@ -1510,15 +1510,17 @@ void Scoreboard_Draw() { // a negative number means we are awaiting respawn, time value is still the same respawn_time *= -1; // remove mark now that we checked it - respawn_time = max(time, respawn_time); // don't show a negative value while the server is respawning the player (lag) - str = sprintf(_("^1Respawning in ^3%s^1..."), - (autocvar_hud_panel_scoreboard_respawntime_decimals ? - count_seconds_decs(respawn_time - time, autocvar_hud_panel_scoreboard_respawntime_decimals) - : - count_seconds(ceil(respawn_time - time)) - ) - ); + if(respawn_time < time) // it happens for a few frames when server is respawning the player + str = ""; // draw an empty string to not change suddenly scoreboard_bottom + else + str = sprintf(_("^1Respawning in ^3%s^1..."), + (autocvar_hud_panel_scoreboard_respawntime_decimals ? + count_seconds_decs(respawn_time - time, autocvar_hud_panel_scoreboard_respawntime_decimals) + : + count_seconds(ceil(respawn_time - time)) + ) + ); } else if(time < respawn_time) {