]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/world.qc
Since strftime(false, "%s") doesn't work on Windows implement a qc version of it...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / world.qc
index bffb7dbd59f40d30cb682dcbd811ac543a709646..7b9697d1740476030af313e0cc6c2a5827de5e19 100644 (file)
@@ -839,7 +839,10 @@ spawnfunc(worldspawn)
        // character set: ASCII 33-126 without the following characters: : ; ' " \ $
        if(autocvar_sv_eventlog)
        {
-               string s = sprintf("%s.%s.%06d", itos(autocvar_sv_eventlog_files_counter), strftime(false, "%s"), floor(random() * 1000000));
+               string num = strftime(false, "%s");
+               if (num == "")
+                       num = strftime_s();
+               string s = sprintf("%s.%s.%06d", itos(autocvar_sv_eventlog_files_counter), num, floor(random() * 1000000));
                matchid = strzone(s);
 
                GameLogEcho(strcat(":gamestart:", GetGametype(), "_", GetMapname(), ":", s));