]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/intermission.qc
Since strftime(false, "%s") doesn't work on Windows implement a qc version of it...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / intermission.qc
index e6766cd590d8f46b0c60f5b7759303843eb1af33..3bb3bdb8e01b65aa552405537573bfd713ccc97a 100644 (file)
@@ -431,7 +431,14 @@ void IntermissionThink(entity this)
                && ((this.autoscreenshot > 0) && (time > this.autoscreenshot)) )
        {
                this.autoscreenshot = -1;
-               if(IS_REAL_CLIENT(this)) { stuffcmd(this, sprintf("\nscreenshot screenshots/autoscreenshot/%s-%s.jpg; echo \"^5A screenshot has been taken at request of the server.\"\n", GetMapname(), strftime(false, "%s"))); }
+               if(IS_REAL_CLIENT(this))
+               {
+                       string num = strftime(false, "%s");
+                       if (num == "")
+                               num = strftime_s();
+                       stuffcmd(this, sprintf("\nscreenshot screenshots/autoscreenshot/%s-%s.jpg; "
+                               "echo \"^5A screenshot has been taken at request of the server.\"\n", GetMapname(), num));
+               }
                return;
        }