From: terencehill Date: Fri, 30 Aug 2024 14:21:32 +0000 (+0200) Subject: Refactor write_recordmarker to reduce engine function calls and while at it indent... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ccb0440f3ba1c0efea5323515383145c939a7bea;p=xonotic%2Fxonotic-data.pk3dir.git Refactor write_recordmarker to reduce engine function calls and while at it indent code with TABs --- 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;