-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DEMO: add epoch time to fullserverinfo
- Loading branch information
Showing
1 changed file
with
5 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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]; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
ciscon
Author
Collaborator
|
||
|
||
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) ); | ||
|
This oughta be 21 to allow for NUL term on 64bit?