]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Use ftos_decimals instead of foolshly bounding and substring-ing the value. Respawn...
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 6 Oct 2012 11:57:39 +0000 (14:57 +0300)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 6 Oct 2012 11:57:39 +0000 (14:57 +0300)
qcsrc/client/scoreboard.qc

index ffa4c6e220bec97c2c28d08a874abfe90e47b3aa..9bc340abcceb17c219ae0501dce46eb19fd86720 100644 (file)
@@ -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");