From ccb0440f3ba1c0efea5323515383145c939a7bea Mon Sep 17 00:00:00 2001 From: terencehill Date: Fri, 30 Aug 2024 16:21:32 +0200 Subject: [PATCH] Refactor write_recordmarker to reduce engine function calls and while at it indent code with TABs --- qcsrc/server/race.qc | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/qcsrc/server/race.qc b/qcsrc/server/race.qc index 2430a6cbd..078f9e192 100644 --- a/qcsrc/server/race.qc +++ b/qcsrc/server/race.qc @@ -56,13 +56,11 @@ string uid2name(string myuid) 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), false)), - " ", ftos(tstart), " ", ftos(dt), "\n")); + 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)); } IntrusiveList g_race_targets; -- 2.39.2