From b952a73bd5087e2b2e25a143c58c1f1d25e7cd3a Mon Sep 17 00:00:00 2001 From: Andrey Nazarov Date: Sat, 27 Sep 2008 15:49:11 +0000 Subject: Fixed dedicated server UDP socket being created too early, missing any `net_port' options given in configs executed from command line. --- source/common.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'source/common.c') 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" -- cgit v1.2.3