From fdc6550fe8559e3a4ce5bc5769b1d3d0747207c9 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Sun, 11 Dec 2011 13:46:38 +0100 Subject: [PATCH] sprintf1s in help --- qcsrc/common/gamecommand.qc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qcsrc/common/gamecommand.qc b/qcsrc/common/gamecommand.qc index ee1657d66..9595ed5c2 100644 --- a/qcsrc/common/gamecommand.qc +++ b/qcsrc/common/gamecommand.qc @@ -193,6 +193,7 @@ float GameCommand_Generic(string command) print(" time ------------------------------> f : seconds since VM start\n"); print(" s /MD4 digest ---------------------> s : MD4 digest\n"); print(" s /SHA256 digest ------------------> s : SHA256 digest\n"); + print(" s /formatstring sprintf1s ---------> s : sprintf with 1 string (pad, cut)\n"); print(" Set operations operate on 'such''strings'.\n"); print(" Unknown tokens insert their cvar value.\n"); print(" maplist add map\n"); @@ -791,6 +792,9 @@ float GameCommand_Generic(string command) } else if(rpncmd == "digest") { s = rpn_pop(); rpn_set(digest_hex(s, rpn_get())); + } else if(rpncmd == "sprintf1s") { + s = rpn_pop(); + rpn_set(sprintf(s, rpn_get())); } else { rpn_push(cvar_string(rpncmd)); } -- 2.39.2