summaryrefslogtreecommitdiff
path: root/src/common.c
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2011-05-26 16:18:39 +0400
committerAndrey Nazarov <skuller@skuller.net>2011-05-30 17:58:40 +0400
commit4884a7c366e068de3f818b6c2eec0ae41f940140 (patch)
treefaef0b8c067c7e6840247b0ef05b88efdbc79d9f /src/common.c
parentd7bcacd9fb01162c70f5f44ed9bea360c1ad4be4 (diff)
Don't print version twice on startup.
Also print to stderr when called with ‘--version’ argument.
Diffstat (limited to 'src/common.c')
-rw-r--r--src/common.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/common.c b/src/common.c
index ffe22ed..2186d79 100644
--- a/src/common.c
+++ b/src/common.c
@@ -89,6 +89,9 @@ cvar_t *allow_download_others;
cvar_t *rcon_password;
+const char com_version_string[] =
+ APPLICATION " " VERSION " " __DATE__ " " BUILDSTRING " " CPUSTRING;
+
qhandle_t com_logFile;
qboolean com_logNewline;
unsigned com_framenum;
@@ -1909,8 +1912,6 @@ Qcommon_Init
=================
*/
void Qcommon_Init( int argc, char **argv ) {
- static const char version[] = APPLICATION " " VERSION " " __DATE__ " " BUILDSTRING " " CPUSTRING;
-
if( setjmp( abortframe ) )
Sys_Error( "Error during initialization: %s", com_errorMsg );
@@ -1970,7 +1971,7 @@ void Qcommon_Init( int argc, char **argv ) {
com_debug_break = Cvar_Get( "com_debug_break", "0", 0 );
#endif
com_fatal_error = Cvar_Get( "com_fatal_error", "0", 0 );
- com_version = Cvar_Get( "version", version, CVAR_SERVERINFO|CVAR_ROM );
+ com_version = Cvar_Get( "version", com_version_string, CVAR_SERVERINFO|CVAR_ROM );
allow_download = Cvar_Get( "allow_download", Com_IsDedicated() ? "0" : "1", CVAR_ARCHIVE );
allow_download_players = Cvar_Get( "allow_download_players", "1", CVAR_ARCHIVE );
@@ -2009,9 +2010,6 @@ void Qcommon_Init( int argc, char **argv ) {
Sys_RunConsole();
#endif
- // print version
- Com_LPrintf( PRINT_NOTICE, "%s\n", version );
-
FS_Init();
#if USE_SYSCON