return s;
}
-void write_recordmarker(entity pl, float tstart, float dt)
+void write_recordmarker(entity pl, float newpos, 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,
- sprintf("//%s RECORD SET %s %f %f\n", strconv(2, 0, 0, GetGametype()),
- TIME_ENCODED_TOSTRING(TIME_ENCODE(dt), false), tstart, dt));
+ GameLogEcho(strcat(":recordset:", ftos(newpos), ":", ftos(pl.playerid), ":", ftos(etof(pl)), ":", ftos(dt)));
-
+ // also write a marker into demo files for demotc-race-record-extractor to find
+ if (pl.crypto_idfp != "") {
- stuffcmd(pl,
- 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,
- 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")));
- }
++ stuffcmd(pl,
++ sprintf("//%s RECORD SET %s %f %f %f %s\n", strconv(2, 0, 0, GetGametype()),
++ TIME_ENCODED_TOSTRING(TIME_ENCODE(dt), false), tstart, dt, newpos, pl.crypto_idfp));
++ } else {
++ stuffcmd(pl,
++ sprintf("//%s RECORD SET %s %f %f %f ANONYMOUS\n", strconv(2, 0, 0, GetGametype()),
++ TIME_ENCODED_TOSTRING(TIME_ENCODE(dt), false), tstart, dt, newpos));
++ }
}
IntrusiveList g_race_targets;