/* * CL_ShutdownInput */ void CL_ShutdownInput( void ) { if( !in_initialized ) return; Cmd_RemoveCommand( "in_restart" ); IN_Shutdown(); Cmd_RemoveCommand( "centerview" ); Cmd_RemoveCommand( "+moveup" ); Cmd_RemoveCommand( "-moveup" ); Cmd_RemoveCommand( "+movedown" ); Cmd_RemoveCommand( "-movedown" ); Cmd_RemoveCommand( "+left" ); Cmd_RemoveCommand( "-left" ); Cmd_RemoveCommand( "+right" ); Cmd_RemoveCommand( "-right" ); Cmd_RemoveCommand( "+forward" ); Cmd_RemoveCommand( "-forward" ); Cmd_RemoveCommand( "+back" ); Cmd_RemoveCommand( "-back" ); Cmd_RemoveCommand( "+lookup" ); Cmd_RemoveCommand( "-lookup" ); Cmd_RemoveCommand( "+lookdown" ); Cmd_RemoveCommand( "-lookdown" ); Cmd_RemoveCommand( "+strafe" ); Cmd_RemoveCommand( "-strafe" ); Cmd_RemoveCommand( "+moveleft" ); Cmd_RemoveCommand( "-moveleft" ); Cmd_RemoveCommand( "+moveright" ); Cmd_RemoveCommand( "-moveright" ); Cmd_RemoveCommand( "+speed" ); Cmd_RemoveCommand( "-speed" ); Cmd_RemoveCommand( "+attack" ); Cmd_RemoveCommand( "-attack" ); Cmd_RemoveCommand( "+use" ); Cmd_RemoveCommand( "-use" ); Cmd_RemoveCommand( "+klook" ); Cmd_RemoveCommand( "-klook" ); // wsw Cmd_RemoveCommand( "+special" ); Cmd_RemoveCommand( "-special" ); Cmd_RemoveCommand( "+zoom" ); Cmd_RemoveCommand( "-zoom" ); Dynvar_Destroy( Dynvar_Lookup( "m_filterBufferDecay" ) ); Dynvar_Destroy( Dynvar_Lookup( "m_filterBufferSize" ) ); Mem_ZoneFree( buf_x ); Mem_ZoneFree( buf_y ); in_initialized = true; }
/* * Com_Quit * * Both client and server can use this, and it will * do the apropriate things. */ void Com_Quit( void ) { if( dynvars_initialized ) { dynvar_t *quit = Dynvar_Lookup( "quit" ); if( quit ) { // wsw : aiwa : added "quit" event for pluggable clean-up (e.g. IRC shutdown) Dynvar_CallListeners( quit, NULL ); } Dynvar_Destroy( quit ); } SV_Shutdown( "Server quit\n" ); CL_Shutdown(); MM_Shutdown(); if( log_file ) { FS_FCloseFile( log_file ); log_file = 0; } Sys_Quit(); }
void Dynvar_Shutdown( void ) { if( dynvar_initialized ) { struct trie_dump_s *dump; unsigned int i; assert( dynvar_trie ); Cmd_RemoveCommand( "dynvarlist" ); Cmd_RemoveCommand( "setdyn" ); Trie_Dump( dynvar_trie, "", TRIE_DUMP_VALUES, &dump ); for( i = 0; i < dump->size; i++ ) { Dynvar_Destroy( (dynvar_t *)dump->key_value_vector[i].value ); } Trie_FreeDump( dump ); dynvar_initialized = qfalse; } if( dynvar_preinitialized ) { assert( dynvar_trie ); Trie_Destroy( dynvar_trie ); dynvar_trie = NULL; dynvar_preinitialized = qfalse; } }