From 9b221495095c9214a93f1437f362181f575de4a3 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sat, 2 May 2020 19:26:19 +0300 Subject: [PATCH] engine: host: execute server.cfg right before main loop starts --- engine/common/host.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/engine/common/host.c b/engine/common/host.c index 0e1223a8..aa6df9c6 100644 --- a/engine/common/host.c +++ b/engine/common/host.c @@ -1086,8 +1086,15 @@ int EXPORT Host_Main( int argc, char **argv, const char *progname, int bChangeGa oldtime = Sys_DoubleTime() - 0.1; if( Host_IsDedicated() && GameState->nextstate == STATE_RUNFRAME ) + { Con_Printf( "type 'map ' to run server... (TAB-autocomplete is working too)\n" ); + // execute server.cfg after commandline + // so we have a chance to set servercfgfile + Cbuf_AddText( va( "exec %s\n", Cvar_VariableString( "servercfgfile" ))); + Cbuf_Execute(); + } + // main window message loop while( !host.crashed ) {