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
|
||||
CL_Disconnect();
|
||||
Host_ShutdownServer();
|
||||
SV_Shutdown( "Server was killed due to demo playback start\n" );
|
||||
|
||||
Con_FastClose();
|
||||
UI_SetActiveMenu( false );
|
||||
|
|
|
@ -1401,7 +1401,8 @@ static void CL_Connect_f( void )
|
|||
Q_strncpy( server, Cmd_Argv( 1 ), sizeof( server ));
|
||||
|
||||
// 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
|
||||
|
||||
Con_Printf( "server %s\n", server );
|
||||
|
|
|
@ -555,7 +555,6 @@ void Host_WriteServerConfig( const char *name );
|
|||
void Host_WriteOpenGLConfig( void );
|
||||
void Host_WriteVideoConfig( void );
|
||||
void Host_WriteConfig( void );
|
||||
void Host_ShutdownServer( void );
|
||||
void Host_Error( const char *error, ... ) FORMAT_CHECK( 1 );
|
||||
void Host_ValidateEngineFeatures( uint32_t mask, uint32_t features );
|
||||
void Host_Frame( double time );
|
||||
|
|
|
@ -237,11 +237,6 @@ static void Sys_PrintBugcompUsage( const char *exename )
|
|||
Sys_Quit();
|
||||
}
|
||||
|
||||
void Host_ShutdownServer( void )
|
||||
{
|
||||
SV_Shutdown( "Server was killed\n" );
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
Host_PrintEngineFeatures
|
||||
|
@ -841,7 +836,7 @@ void GAME_EXPORT Host_Error( const char *error, ... )
|
|||
COM_InitHostState();
|
||||
Cbuf_Clear();
|
||||
|
||||
Host_ShutdownServer();
|
||||
SV_Shutdown( "Server was killed due to an error\n" );
|
||||
CL_Drop(); // drop clients
|
||||
|
||||
// recreate world if needs
|
||||
|
|
|
@ -846,7 +846,7 @@ Kick everyone off, possibly in preparation for a new game
|
|||
*/
|
||||
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 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
|
||||
svs.maxclients = (int)sv_maxclients.value;
|
||||
|
|
Loading…
Add table
Reference in a new issue