/// <summary> /// Host_ClearMemory /// </summary> public static void ClearMemory() { Con.DPrint("Clearing memory\n"); Mod.ClearAll(); Client.cls.signon = 0; Server.sv.Clear(); Client.cl.Clear(); }
public static void Shutdown() { if (Global.InHostShutdown) { Sys.DebugOutStraight("Host_Shutdown: Recursive shutdown."); } else { Global.InHostShutdown = true; Global.HostInit = false; SV.ServerDeactivate(); Mod.ClearAll(); SV.ClearAllEntities(); CM.FreePAS(); SV.FreePMSimulator(); SV.Shutdown(); ReleaseEntityDLLs(); Delta.Shutdown(); NET.Shutdown(); // if WADPath != nil then // Mem.FreeAndNil(WADPath); Draw.DecalShutdown(); W.Shutdown(); HPAK.FlushHostQueue(); Con.Shutdown(); Cmd.RemoveGameCmds(); Cmd.Shutdown(); CVar.Shutdown(); LPrint("Server shutdown\n"); Log.Close(); Global.RealTime = 0.0; SV.Time = 0.0; } }