Browse Source

engine: server: execute map change config file before entities precaching.

master
Andrey Akhmichin 10 months ago committed by Alibek Omarov
parent
commit
f649076bc3
  1. 16
      engine/server/sv_init.c

16
engine/server/sv_init.c

@ -588,7 +588,6 @@ void SV_ActivateServer( int runPhysics ) @@ -588,7 +588,6 @@ void SV_ActivateServer( int runPhysics )
byte msg_buf[MAX_INIT_MSG];
sizebuf_t msg;
sv_client_t *cl;
const char *cycle;
if( !svs.initialized )
return;
@ -674,11 +673,6 @@ void SV_ActivateServer( int runPhysics ) @@ -674,11 +673,6 @@ void SV_ActivateServer( int runPhysics )
if( sv.ignored_world_decals )
Con_Printf( S_WARN "%i static decals was rejected due buffer overflow\n", sv.ignored_world_decals );
cycle = Cvar_VariableString( "mapchangecfgfile" );
if( COM_CheckString( cycle ))
Cbuf_AddTextf( "exec %s\n", cycle );
}
/*
@ -990,8 +984,9 @@ clients along with it. @@ -990,8 +984,9 @@ clients along with it.
*/
qboolean SV_SpawnServer( const char *mapname, const char *startspot, qboolean background )
{
int i, current_skill;
edict_t *ent;
int i, current_skill;
edict_t *ent;
const char *cycle;
SV_SetupClients();
@ -1009,6 +1004,11 @@ qboolean SV_SpawnServer( const char *mapname, const char *startspot, qboolean ba @@ -1009,6 +1004,11 @@ qboolean SV_SpawnServer( const char *mapname, const char *startspot, qboolean ba
svs.timestart = Sys_DoubleTime();
svs.spawncount++; // any partially connected client will be restarted
cycle = Cvar_VariableString( "mapchangecfgfile" );
if( COM_CheckString( cycle ))
Cbuf_AddTextf( "exec %s\n", cycle );
// let's not have any servers with no name
if( !COM_CheckString( hostname.string ))
Cvar_Set( "hostname", svgame.dllFuncs.pfnGetGameDescription ? svgame.dllFuncs.pfnGetGameDescription() : FS_Title( ));

Loading…
Cancel
Save