]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/race.qc
Further cleanup miscfunctions, document the need to use intrusive lists on entities...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / race.qc
index 5014e02aedb0836af94e33a7405f58c2899a764e..7c04ea1da88dda0542b2daf328fdd1af5a4a75b3 100644 (file)
@@ -3,6 +3,7 @@
 #include <common/weapons/_all.qh>
 #include <common/stats.qh>
 #include <server/damage.qh>
+#include <server/gamelog.qh>
 #include <server/intermission.qh>
 #include <server/world.qh>
 #include <server/miscfunctions.qh>
 #include <common/vehicles/sv_vehicles.qh>
 #include "../common/mutators/mutator/waypoints/waypointsprites.qh"
 
+void write_recordmarker(entity pl, float tstart, float dt)
+{
+    GameLogEcho(strcat(":recordset:", ftos(pl.playerid), ":", ftos(dt)));
+
+    // also write a marker into demo files for demotc-race-record-extractor to find
+    stuffcmd(pl,
+             strcat(
+                 strcat("//", strconv(2, 0, 0, GetGametype()), " RECORD SET ", TIME_ENCODED_TOSTRING(TIME_ENCODE(dt))),
+                 " ", ftos(tstart), " ", ftos(dt), "\n"));
+}
+
 IntrusiveList g_race_targets;
 IntrusiveList g_racecheckpoints;
 STATIC_INIT(g_race)