Browse Source

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

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

12
engine/server/sv_init.c

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

Loading…
Cancel
Save