Make time work after ready restart, also fix time being off by 1
authorMario <zacjardine@y7mail.com>
Thu, 1 Oct 2015 13:08:34 +0000 (23:08 +1000)
committerMario <zacjardine@y7mail.com>
Thu, 1 Oct 2015 13:08:34 +0000 (23:08 +1000)
qcsrc/server/miscfunctions.qc

index 5317fe6..a616474 100644 (file)
@@ -300,7 +300,7 @@ string formatmessage(string msg)
                        case "s": replacement = ftos(vlen(self.velocity - self.velocity_z * '0 0 1')); break;
                        case "S": replacement = ftos(vlen(self.velocity)); break;
                        case "t": replacement = seconds_tostring(ceil(max(0, autocvar_timelimit * 60 + game_starttime - time))); break;
-                       case "T": replacement = seconds_tostring(time); break;
+                       case "T": replacement = seconds_tostring(floor(time - game_starttime)); break;
                        default:
                        {
                                MUTATOR_CALLHOOK(FormatMessage, escape, replacement, msg);