From: Nikolay S <nick@teichisma.info> Date: Mon, 2 Sep 2024 17:29:23 +0000 (+0200) Subject: Merge remote-tracking branch 'origin/master' into morosophos/server-current4 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a3cae826d5671aa60722c6494c08adacb0c50c14;p=xonotic%2Fxonotic-data.pk3dir.git Merge remote-tracking branch 'origin/master' into morosophos/server-current4 --- a3cae826d5671aa60722c6494c08adacb0c50c14 diff --cc qcsrc/server/race.qc index b3d087f165,078f9e1923..e882c9677a --- a/qcsrc/server/race.qc +++ b/qcsrc/server/race.qc @@@ -64,23 -54,13 +64,19 @@@ string uid2name(string myuid 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;