]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix demo record marker
authorNikolay S <nick@teichisma.info>
Sat, 7 Sep 2024 20:18:20 +0000 (22:18 +0200)
committerNikolay S <nick@teichisma.info>
Sat, 7 Sep 2024 20:18:20 +0000 (22:18 +0200)
qcsrc/server/race.qc

index bc74000e58087a99ad396077fc791e8e6fc2be65..955db3dd5cfb3d8ede607d8676fe2ebd523dc1a6 100644 (file)
@@ -70,13 +70,16 @@ void write_recordmarker(entity pl, float newpos, float tstart, float dt)
     // also write a marker into demo files for demotc-race-record-extractor to find
     if (pl.crypto_idfp != "") {
                stuffcmd(pl,
-                       sprintf("//%s RECORD SET %s %f %f %f %d %s\n", strconv(2, 0, 0, GetGametype()),
-                               TIME_ENCODED_TOSTRING(TIME_ENCODE(dt), false), tstart, dt, newpos, pl.crypto_idfp));
-       } else {
+                                strcat(
+                                        strcat("//", strconv(2, 0, 0, GetGametype()), " RECORD SET ", TIME_ENCODED_TOSTRING(TIME_ENCODE(dt), false)),
+                                        strcat(" ", ftos(tstart), " ", ftos(dt), " ", ftos(newpos), " "),
+                                        strcat(pl.crypto_idfp, "\n")));
+         } else {
                stuffcmd(pl,
-                       sprintf("//%s RECORD SET %s %f %f %f %d ANONYMOUS\n", strconv(2, 0, 0, GetGametype()),
-                               TIME_ENCODED_TOSTRING(TIME_ENCODE(dt), false), tstart, dt, newpos));
-       }
+                                strcat(
+                                        strcat("//", strconv(2, 0, 0, GetGametype()), " RECORD SET ", TIME_ENCODED_TOSTRING(TIME_ENCODE(dt), false)),
+                                        strcat(" ", ftos(tstart), " ", ftos(dt), " ", ftos(newpos), " ANONYMOUS\n")));
+         }
 }
 
 IntrusiveList g_race_targets;