]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/gamecommand.qc
fix some compat issues
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / gamecommand.qc
index 518cf74971a645dde3c412c1a1eaabee9b5ae1b8..ee1657d66f0a2c1c113874be845adfa8e3ca5ff0 100644 (file)
@@ -191,6 +191,8 @@ float GameCommand_Generic(string command)
                print("    s localtime -----------------------> s   : formats the current local time\n");
                print("    s gmtime --------------------------> s   : formats the current UTC time\n");
                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("    Set operations operate on 'such''strings'.\n");
                print("    Unknown tokens insert their cvar value.\n");
                print("  maplist add map\n");
@@ -422,11 +424,7 @@ float GameCommand_Generic(string command)
                                                rpn_error = TRUE;
                                        }
                                } else if(rpncmd == "load") {
-#ifdef SVQC
-                                       rpn_set(cvar_string_builtin(rpn_get())); // cvar name comes from user
-#else
                                        rpn_set(cvar_string(rpn_get()));
-#endif
                                } else if(rpncmd == "exch") {
                                        s = rpn_pop();
                                        s2 = rpn_get();
@@ -790,6 +788,9 @@ float GameCommand_Generic(string command)
                                        rpn_set(strftime(FALSE, rpn_get()));
                                } else if(rpncmd == "time") {
                                        rpn_pushf(time);
+                               } else if(rpncmd == "digest") {
+                                       s = rpn_pop();
+                                       rpn_set(digest_hex(s, rpn_get()));
                                } else {
                                        rpn_push(cvar_string(rpncmd));
                                }