From 8fb97a61524460a2a3757c441b44dae3f64a0112 Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Fri, 3 Jul 2015 10:39:44 -0400 Subject: [PATCH] Add date to sm_dump_netprops_xml output. --- extensions/sdktools/vhelpers.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/extensions/sdktools/vhelpers.cpp b/extensions/sdktools/vhelpers.cpp index be081308..9cba4386 100644 --- a/extensions/sdktools/vhelpers.cpp +++ b/extensions/sdktools/vhelpers.cpp @@ -538,8 +538,22 @@ CON_COMMAND(sm_dump_netprops_xml, "Dumps the networkable property table as an XM return; } + char buffer[80]; + buffer[0] = 0; + +#if defined SUBPLATFORM_SECURECRT + _invalid_parameter_handler handler = _set_invalid_parameter_handler(_ignore_invalid_parameter); +#endif + + time_t t = g_pSM->GetAdjustedTime(); + size_t written = strftime(buffer, sizeof(buffer), "%Y/%m/%d", localtime(&t)); + +#if defined SUBPLATFORM_SECURECRT + _set_invalid_parameter_handler(handler); +#endif + fprintf(fp, "\n\n"); - fprintf(fp, "\n\n", g_pSM->GetGameFolderName()); + fprintf(fp, "\n\n", g_pSM->GetGameFolderName(), buffer); ServerClass *pBase = gamedll->GetAllServerClasses(); while (pBase != NULL)