engine: always include reason to server shutdown
This commit is contained in:
parent
fd2b7e9197
commit
48bdd4238e
6 changed files with 7 additions and 11 deletions
|
@ -724,7 +724,7 @@ static void CL_DemoStartPlayback( int mode )
|
||||||
{
|
{
|
||||||
// NOTE: at this point demo is still valid
|
// NOTE: at this point demo is still valid
|
||||||
CL_Disconnect();
|
CL_Disconnect();
|
||||||
Host_ShutdownServer();
|
SV_Shutdown( "Server was killed due to demo playback start\n" );
|
||||||
|
|
||||||
Con_FastClose();
|
Con_FastClose();
|
||||||
UI_SetActiveMenu( false );
|
UI_SetActiveMenu( false );
|
||||||
|
|
|
@ -1401,7 +1401,8 @@ static void CL_Connect_f( void )
|
||||||
Q_strncpy( server, Cmd_Argv( 1 ), sizeof( server ));
|
Q_strncpy( server, Cmd_Argv( 1 ), sizeof( server ));
|
||||||
|
|
||||||
// if running a local server, kill it and reissue
|
// if running a local server, kill it and reissue
|
||||||
if( SV_Active( )) Host_ShutdownServer();
|
if( SV_Active( ))
|
||||||
|
SV_Shutdown( "Server was killed due to connection to remote server\n" );
|
||||||
NET_Config( true, !cl_nat.value ); // allow remote
|
NET_Config( true, !cl_nat.value ); // allow remote
|
||||||
|
|
||||||
Con_Printf( "server %s\n", server );
|
Con_Printf( "server %s\n", server );
|
||||||
|
|
|
@ -555,7 +555,6 @@ void Host_WriteServerConfig( const char *name );
|
||||||
void Host_WriteOpenGLConfig( void );
|
void Host_WriteOpenGLConfig( void );
|
||||||
void Host_WriteVideoConfig( void );
|
void Host_WriteVideoConfig( void );
|
||||||
void Host_WriteConfig( void );
|
void Host_WriteConfig( void );
|
||||||
void Host_ShutdownServer( void );
|
|
||||||
void Host_Error( const char *error, ... ) FORMAT_CHECK( 1 );
|
void Host_Error( const char *error, ... ) FORMAT_CHECK( 1 );
|
||||||
void Host_ValidateEngineFeatures( uint32_t mask, uint32_t features );
|
void Host_ValidateEngineFeatures( uint32_t mask, uint32_t features );
|
||||||
void Host_Frame( double time );
|
void Host_Frame( double time );
|
||||||
|
|
|
@ -237,11 +237,6 @@ static void Sys_PrintBugcompUsage( const char *exename )
|
||||||
Sys_Quit();
|
Sys_Quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Host_ShutdownServer( void )
|
|
||||||
{
|
|
||||||
SV_Shutdown( "Server was killed\n" );
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
================
|
================
|
||||||
Host_PrintEngineFeatures
|
Host_PrintEngineFeatures
|
||||||
|
@ -841,7 +836,7 @@ void GAME_EXPORT Host_Error( const char *error, ... )
|
||||||
COM_InitHostState();
|
COM_InitHostState();
|
||||||
Cbuf_Clear();
|
Cbuf_Clear();
|
||||||
|
|
||||||
Host_ShutdownServer();
|
SV_Shutdown( "Server was killed due to an error\n" );
|
||||||
CL_Drop(); // drop clients
|
CL_Drop(); // drop clients
|
||||||
|
|
||||||
// recreate world if needs
|
// recreate world if needs
|
||||||
|
|
|
@ -846,7 +846,7 @@ Kick everyone off, possibly in preparation for a new game
|
||||||
*/
|
*/
|
||||||
static void SV_KillServer_f( void )
|
static void SV_KillServer_f( void )
|
||||||
{
|
{
|
||||||
Host_ShutdownServer();
|
SV_Shutdown( "Server was killed due to shutdownserver command\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -805,7 +805,8 @@ static void SV_SetupClients( void )
|
||||||
if( !changed_maxclients ) return; // nothing to change
|
if( !changed_maxclients ) return; // nothing to change
|
||||||
|
|
||||||
// if clients count was changed we need to run full shutdown procedure
|
// if clients count was changed we need to run full shutdown procedure
|
||||||
if( svs.maxclients ) Host_ShutdownServer();
|
if( svs.maxclients )
|
||||||
|
SV_Shutdown( "Server was killed due to maxclients change\n" );
|
||||||
|
|
||||||
// copy the actual value from cvar
|
// copy the actual value from cvar
|
||||||
svs.maxclients = (int)sv_maxclients.value;
|
svs.maxclients = (int)sv_maxclients.value;
|
||||||
|
|
Loading…
Add table
Reference in a new issue