/* * @brief */ void Cl_ClearState(void) { if (Com_WasInit(QUETOO_CGAME)) cls.cgame->ClearState(); Cl_ClearInput(); // wipe the entire cl_client_t structure memset(&cl, 0, sizeof(cl)); Com_QuitSubsystem(QUETOO_CLIENT); Mem_ClearBuffer(&cls.net_chan.message); }
/* * @brief Wipes the sv_server_t structure after freeing any references it holds. */ static void Sv_ClearState() { if (svs.initialized) { // if we were intialized, cleanup if (sv.demo_file) { Fs_Close(sv.demo_file); } } memset(&sv, 0, sizeof(sv)); Com_QuitSubsystem(Q2W_SERVER); svs.real_time = 0; svs.next_heartbeat = 0; }