2016-07-26 03:22:47 +03:00
|
|
|
#include "precompiled.h"
|
|
|
|
|
2016-07-26 19:31:47 +03:00
|
|
|
char *UTIL_VarArgs(char *format, ...)
|
2016-07-26 03:22:47 +03:00
|
|
|
{
|
2016-07-26 19:31:47 +03:00
|
|
|
va_list argptr;
|
|
|
|
static char string[1024];
|
2016-07-26 03:22:47 +03:00
|
|
|
|
|
|
|
va_start(argptr, format);
|
2016-07-26 19:31:47 +03:00
|
|
|
Q_vsnprintf(string, sizeof(string), format, argptr);
|
2016-07-26 03:22:47 +03:00
|
|
|
va_end(argptr);
|
|
|
|
|
|
|
|
return string;
|
|
|
|
}
|
|
|
|
|
2016-07-26 15:18:32 +03:00
|
|
|
// UTIL_LogPrintf - Prints a logged message to console.
|
|
|
|
// Preceded by LOG: ( timestamp ) < message >
|
|
|
|
void UTIL_LogPrintf(char *fmt, ...)
|
2016-07-26 03:22:47 +03:00
|
|
|
{
|
2016-07-26 19:31:47 +03:00
|
|
|
va_list argptr;
|
2017-01-06 22:33:36 +03:00
|
|
|
char string[1024];
|
2016-07-26 03:22:47 +03:00
|
|
|
|
2016-07-26 15:18:32 +03:00
|
|
|
va_start(argptr, fmt);
|
2016-07-26 19:31:47 +03:00
|
|
|
Q_vsnprintf(string, sizeof(string), fmt, argptr);
|
2016-07-26 15:18:32 +03:00
|
|
|
va_end(argptr);
|
2016-07-26 03:22:47 +03:00
|
|
|
|
2016-07-26 15:18:32 +03:00
|
|
|
// Print to server console
|
|
|
|
ALERT(at_logged, "%s", string);
|
2016-07-26 03:22:47 +03:00
|
|
|
}
|