From 0006b95dfd3a7068481dbf611bce1222a2278e6b Mon Sep 17 00:00:00 2001 From: ciscon Date: Tue, 5 Mar 2024 15:31:57 -0500 Subject: [PATCH] DEMO: add epoch time to fullserverinfo --- src/sv_demo.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/sv_demo.c b/src/sv_demo.c index 47b52a6c..1eee3639 100644 --- a/src/sv_demo.c +++ b/src/sv_demo.c @@ -1183,6 +1183,7 @@ void SV_MVD_SendInitialGamestate(mvddest_t* dest) unsigned char buf_data[MAX_MSGLEN]; unsigned int n; char* s, info[MAX_EXT_INFO_STRING]; + char epoch[20]; client_t* player; edict_t* ent; @@ -1269,6 +1270,10 @@ void SV_MVD_SendInitialGamestate(mvddest_t* dest) MSG_WriteByte (&buf, svc_cdtrack); MSG_WriteByte (&buf, 0); // none in demos + //set start time + sprintf(epoch,"%ld", (unsigned long)time(NULL)); + Info_SetValueForKey (svs.info, "epoch", epoch, MAX_SERVERINFO_STRING); + // send server info string MSG_WriteByte (&buf, svc_stufftext); MSG_WriteString (&buf, va("fullserverinfo \"%s\"\n", svs.info) );