From: Mario Date: Thu, 1 Oct 2015 02:48:14 +0000 (+1000) Subject: Add replacements for %T and %t (time) X-Git-Tag: xonotic-v0.8.2~1895 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=48e30960ba4d9b8840c4e999b39a637ce67cf893;p=xonotic%2Fxonotic-data.pk3dir.git Add replacements for %T and %t (time) --- diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index 0a4108a8e..5317fe684 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -299,6 +299,8 @@ string formatmessage(string msg) case "x": replacement = ((cursor_ent.netname == "" || !cursor_ent) ? "nothing" : cursor_ent.netname); break; 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; default: { MUTATOR_CALLHOOK(FormatMessage, escape, replacement, msg);