diff options
author | Andrey Nazarov <skuller@skuller.net> | 2008-09-27 15:49:11 +0000 |
---|---|---|
committer | Andrey Nazarov <skuller@skuller.net> | 2008-09-27 15:49:11 +0000 |
commit | b952a73bd5087e2b2e25a143c58c1f1d25e7cd3a (patch) | |
tree | 626c56bb5b4c735329e1a846be102204fbcff801 | |
parent | befa1e91050929a6211a88c7a924372fc6bacd0c (diff) |
Fixed dedicated server UDP socket being created too early, missing
any `net_port' options given in configs executed from command line.
-rw-r--r-- | source/common.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source/common.c b/source/common.c index b684d50..00461ff 100644 --- a/source/common.c +++ b/source/common.c @@ -1392,10 +1392,6 @@ void Qcommon_Init( int argc, char **argv ) { SV_Init(); CL_Init(); - if( dedicated->integer ) { - NET_Config( NET_SERVER ); - } - Sys_RunConsole(); // add + commands from command line @@ -1414,6 +1410,12 @@ void Qcommon_Init( int argc, char **argv ) { SCR_EndLoadingPlaque(); } + // even not given a starting map, dedicated server starts + // listening for rcon commands (create socket after all configs + // are executed to make sure port number is properly set) + if( dedicated->integer ) { + NET_Config( NET_SERVER ); + } Com_Printf( "====== " APPLICATION " initialized ======\n\n" ); Com_Printf( S_COLOR_CYAN APPLICATION " " VERSION ", " __DATE__ "\n" |