mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-17 18:40:02 +00:00
engine: server: GoldSrc compliant pfnServerExecute(), don't execute config.cfg for server!
This commit is contained in:
parent
f4961d9da7
commit
0984368a31
@ -365,7 +365,6 @@ typedef struct host_parm_s
|
||||
qboolean apply_game_config; // when true apply only to game cvars and ignore all other commands
|
||||
qboolean apply_opengl_config;// when true apply only to opengl cvars and ignore all other commands
|
||||
qboolean config_executed; // a bit who indicated was config.cfg already executed e.g. from valve.rc
|
||||
int sv_cvars_restored; // count of restored server cvars
|
||||
qboolean crashed; // set to true if crashed
|
||||
qboolean daemonized;
|
||||
qboolean enabledll;
|
||||
|
@ -1021,8 +1021,6 @@ qboolean Cvar_CommandWithPrivilegeCheck( convar_t *v, qboolean isPrivileged )
|
||||
else
|
||||
{
|
||||
Cvar_DirectSet( v, Cmd_Argv( 1 ));
|
||||
if( host.apply_game_config )
|
||||
host.sv_cvars_restored++;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -328,7 +328,6 @@ typedef struct
|
||||
qboolean msg_trace; // trace this message
|
||||
|
||||
void *hInstance; // pointer to game.dll
|
||||
qboolean config_executed; // should to execute config.cfg once time to restore FCVAR_ARCHIVE that specified in hl.dll
|
||||
|
||||
edict_t *edicts; // solid array of server entities
|
||||
int numEntities; // actual entities count
|
||||
|
@ -2455,21 +2455,6 @@ pfnServerExecute
|
||||
void GAME_EXPORT pfnServerExecute( void )
|
||||
{
|
||||
Cbuf_Execute();
|
||||
|
||||
if( svgame.config_executed )
|
||||
return;
|
||||
|
||||
// here we restore arhcived cvars only from game.dll
|
||||
host.apply_game_config = true;
|
||||
Cbuf_AddText( "exec config.cfg\n" );
|
||||
Cbuf_Execute();
|
||||
|
||||
if( host.sv_cvars_restored > 0 )
|
||||
Con_Reportf( "server executing ^2config.cfg^7 (%i cvars)\n", host.sv_cvars_restored );
|
||||
|
||||
host.apply_game_config = false;
|
||||
svgame.config_executed = true;
|
||||
host.sv_cvars_restored = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user