ctf_captimerecord = cap_time;
db_put(ServerProgsDB, strcat(GetMapname(), "/captimerecord/time"), ftos(cap_time));
db_put(ServerProgsDB, strcat(GetMapname(), "/captimerecord/netname"), player.netname);
- write_recordmarker(player, flag.ctf_pickuptime, cap_time);
+ write_recordmarker(player, 1, flag.ctf_pickuptime, cap_time);
}
if(autocvar_g_ctf_leaderboard && !ctf_oneflag)
return MoveToRandomLocationWithinBounds(e, world.mins, world.maxs, goodcontents, badcontents, badsurfaceflags, attempts, maxaboveground, minviewdistance);
}
-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,
- strcat(
- strcat("//", strconv(2, 0, 0, GetGametype()), " RECORD SET ", TIME_ENCODED_TOSTRING(TIME_ENCODE(dt))),
- " ", ftos(tstart), " ", ftos(dt), "\n"));
+ GameLogEcho(strcat(":recordset:", ":", ftos(pl.playerid), ":", ftos(dt)));
+
+ if (pl.crypto_idfp != "") {
+ // 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))),
+ strcat(" ", ftos(tstart), " ", ftos(dt), " ", ftos(newpos), " "),
+ strcat(pl.crypto_idfp, "\n")));
+ }
}
void attach_sameorigin(entity e, entity to, string tag)
entity eliminatedPlayers;
void EliminatedPlayers_Init(float(entity) isEliminated_func);
-void write_recordmarker(entity pl, float tstart, float dt);
+void write_recordmarker(entity pl, float newpos, float tstart, float dt);
void play2all(string samp);
// store new ranking
race_writeTime(GetMapname(), t, myuid);
- if (newpos == 1 && showmessage)
+ if (showmessage)
{
- write_recordmarker(e, time - TIME_DECODE(t), TIME_DECODE(t));
+ write_recordmarker(e, newpos, time - TIME_DECODE(t), TIME_DECODE(t));
race_send_recordtime(MSG_ALL);
}