2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2024-11-22 18:07:09 +01:00

engine: common: fixed dedicated server bug

The problem is server wasn't executing server.cfg if map specified in startup parameters
This commit is contained in:
SNMetamorph 2022-12-04 11:13:00 +04:00 committed by Alibek Omarov
parent 177ed2c603
commit 58465c3727

View File

@ -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 <mapname>' 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 <mapname>' to start game... (TAB-autocomplete is working too)\n" );
Cbuf_AddText( va( "exec %s\n", Cvar_VariableString( "servercfgfile" )));
Cbuf_Execute();
}