Source/ThunderBeast/QuakeToon/server/sv_main.c
void SV_Shutdown (char *finalmsg, qboolean reconnect)
{
	if (svs.clients)
		SV_FinalMessage (finalmsg, reconnect);

	Master_Shutdown ();
	SV_ShutdownGameProgs ();

	// free current level
	if (sv.demofile)
		fclose (sv.demofile);
	memset (&sv, 0, sizeof(sv));
	Com_SetServerState (sv.state);

	// free server static data
	if (svs.clients)
		Z_Free (svs.clients);
	if (svs.client_entities)
		Z_Free (svs.client_entities);
	if (svs.demofile)
		fclose (svs.demofile);
	memset (&svs, 0, sizeof(svs));
}
/*
================
SV_Shutdown

Called when each game quits,
before Sys_Quit or Sys_Error
================
*/
SV_Shutdown
Called when each game quits,
before Sys_Quit or Sys_Error
SV_Shutdown Called when each game quits before Sys_Quit or Sys_Error
void SV_Shutdown (char *finalmsg, qboolean reconnect)
{
	if (svs.clients)
		SV_FinalMessage (finalmsg, reconnect);
	Master_Shutdown ();
	SV_ShutdownGameProgs ();
	if (sv.demofile)
		fclose (sv.demofile);
	memset (&sv, 0, sizeof(sv));
	Com_SetServerState (sv.state);
	if (svs.clients)
		Z_Free (svs.clients);
	if (svs.client_entities)
		Z_Free (svs.client_entities);
	if (svs.demofile)
		fclose (svs.demofile);
	memset (&svs, 0, sizeof(svs));
}
void SV_Shutdown ( char * finalmsg , qboolean reconnect ) { if ( svs . clients ) SV_FinalMessage ( finalmsg , reconnect ) ; Master_Shutdown ( ) ; SV_ShutdownGameProgs ( ) ; if ( sv . demofile ) fclose ( sv . demofile ) ; memset ( & sv , 0 , sizeof ( sv ) ) ; Com_SetServerState ( sv . state ) ; if ( svs . clients ) Z_Free ( svs . clients ) ; if ( svs . client_entities ) Z_Free ( svs . client_entities ) ; if ( svs . demofile ) fclose ( svs . demofile ) ; memset ( & svs , 0 , sizeof ( svs ) ) ; }
SV_Shutdown
Called when each game quits,
before Sys_Quit or Sys_Error
SV_Shutdown Called when each game quits before Sys_Quit or Sys_Error
// free current level // free server static data