]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
sprintf1s in help
authorRudolf Polzer <divverent@alientrap.org>
Sun, 11 Dec 2011 12:46:38 +0000 (13:46 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Sun, 11 Dec 2011 12:46:38 +0000 (13:46 +0100)
qcsrc/common/gamecommand.qc

index ee1657d66f0a2c1c113874be845adfa8e3ca5ff0..9595ed5c298187c799ca628d402a94bd4c7882de 100644 (file)
@@ -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));
                                }