From: Mircea Kitsune Date: Sat, 6 Oct 2012 11:57:39 +0000 (+0300) Subject: Use ftos_decimals instead of foolshly bounding and substring-ing the value. Respawn... X-Git-Tag: xonotic-v0.7.0~198^2~3 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ce46a70f6613f7e04e319bd4947d1c0bdcda2f3f;p=xonotic%2Fxonotic-data.pk3dir.git Use ftos_decimals instead of foolshly bounding and substring-ing the value. Respawn timer will now show values past 9.99 --- diff --git a/qcsrc/client/scoreboard.qc b/qcsrc/client/scoreboard.qc index ffa4c6e22..9bc340abc 100644 --- a/qcsrc/client/scoreboard.qc +++ b/qcsrc/client/scoreboard.qc @@ -1385,10 +1385,10 @@ void HUD_DrawScoreboard() { // 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", substring(ftos(bound(0, respawn_time - time, 9.999999)), 0, 4), "^1 seconds..."); + 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", substring(ftos(bound(0, respawn_time - time, 9.999999)), 0, 4), "^7 seconds before respawning"); + 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");