From 9a461d4b0f6476eddd347aa5cd40adae0eefc26e Mon Sep 17 00:00:00 2001 From: terencehill Date: Mon, 15 Aug 2016 12:35:09 +0200 Subject: [PATCH] Show nothing instead of "Respawning in 0 seconds" when server is respawning the player (it happens only for a few frames) --- qcsrc/client/hud/panel/scoreboard.qc | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) 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) { -- 2.39.2