diff --git a/code/client/cl_main.c b/code/client/cl_main.c index 8f9cbae9..7b207e5e 100644 --- a/code/client/cl_main.c +++ b/code/client/cl_main.c @@ -2564,6 +2564,10 @@ CL_Shutdown void CL_Shutdown( void ) { static qboolean recursive = qfalse; + // check whether the client is running at all. + if(!(com_cl_running && com_cl_running->integer)) + return; + Com_Printf( "----- CL_Shutdown -----\n" ); if ( recursive ) { diff --git a/code/server/sv_init.c b/code/server/sv_init.c index 92dd6ad1..8472adfd 100644 --- a/code/server/sv_init.c +++ b/code/server/sv_init.c @@ -646,7 +646,7 @@ void SV_FinalMessage( char *message ) { if (cl->state >= CS_CONNECTED) { // don't send a disconnect to a local client if ( cl->netchan.remoteAddress.type != NA_LOOPBACK ) { - SV_SendServerCommand( cl, "print \"%s\"\n", message ); + SV_SendServerCommand( cl, "print \"%s\n\"\n", message ); SV_SendServerCommand( cl, "disconnect" ); } // force a snapshot to be sent diff --git a/code/unix/linux_signals.c b/code/unix/linux_signals.c index f9317ce9..3e95f54b 100644 --- a/code/unix/linux_signals.c +++ b/code/unix/linux_signals.c @@ -46,6 +46,7 @@ static void signal_handler(int sig) // bk010104 - replace this... (NOTE TTimo hu // rcg08312005 Agreed: changed to CL_Shutdown... --ryan. CL_Shutdown(); #endif + SV_Shutdown("Signal caught"); Sys_Exit(0); // bk010104 - abstraction NOTE TTimo send a 0 to avoid DOUBLE SIGNAL FAULT }