Add date+time info to fte config files, to thwart people claiming that fte doesn't _save_ their configs when its some quake.rc or autoexec.cfg stomping over things afterwards. Might also be nice to have for people that copy stuff around without saving them that often.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5845 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2021-05-09 13:02:01 +00:00
parent c3038db058
commit 90597c9fbb
1 changed files with 6 additions and 1 deletions

View File

@ -3993,6 +3993,7 @@ static void Cvar_Watch_f(void)
static void Cmd_WriteConfig_f(void)
{
char curtime[256];
vfsfile_t *f;
char *filename;
char fname[MAX_QPATH];
@ -4058,7 +4059,11 @@ static void Cmd_WriteConfig_f(void)
return;
}
VFS_PRINTF(f, "// %s config file\n\n", *fs_gamename.string?fs_gamename.string:FULLENGINENAME);
{
time_t t = time(NULL);
strftime(curtime, sizeof(curtime), "%Y-%m-%d %H:%M", localtime(&t));
}
VFS_PRINTF(f, "// %s config file (%s)\n\n", *fs_gamename.string?fs_gamename.string:FULLENGINENAME, curtime);
#ifdef HAVE_CLIENT
if (cfg_save_binds.ival)
Key_WriteBindings (f);