From 58465c3727718c3178413a585e0ee5377ad4a9d5 Mon Sep 17 00:00:00 2001 From: SNMetamorph <25657591+SNMetamorph@users.noreply.github.com> Date: Sun, 4 Dec 2022 11:13:00 +0400 Subject: [PATCH] engine: common: fixed dedicated server bug The problem is server wasn't executing server.cfg if map specified in startup parameters --- engine/common/host.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/engine/common/host.c b/engine/common/host.c index 7a8ff51a..f7e91114 100644 --- a/engine/common/host.c +++ b/engine/common/host.c @@ -1206,11 +1206,13 @@ 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 ) + if( Host_IsDedicated( )) { + if( GameState->nextstate == STATE_RUNFRAME ) + Con_Printf( "Type 'map ' to start game... (TAB-autocomplete is working too)\n" ); + // execute server.cfg after commandline // so we have a chance to set servercfgfile - Con_Printf( "Type 'map ' to start game... (TAB-autocomplete is working too)\n" ); Cbuf_AddText( va( "exec %s\n", Cvar_VariableString( "servercfgfile" ))); Cbuf_Execute(); }