From: Nikolay S Date: Sat, 7 Sep 2024 20:18:20 +0000 (+0200) Subject: Fix demo record marker X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=refs%2Fheads%2Fmorosophos%2Fserver-current4;p=xonotic%2Fxonotic-data.pk3dir.git Fix demo record marker --- diff --git a/qcsrc/server/race.qc b/qcsrc/server/race.qc index bc74000e5..955db3dd5 100644 --- a/qcsrc/server/race.qc +++ b/qcsrc/server/race.qc @@ -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;