/// <summary> /// host_EndGame /// </summary> public void EndGame(String message, params Object[] args) { var str = String.Format(message, args); Console.DPrint("host_old_EndGame: {0}\n", str); if (Server.IsActive) { ShutdownServer(false); } if (Client.cls.state == cactive_t.ca_dedicated) { Utilities.Error("host_old_EndGame: {0}\n", str); // dedicated servers exit } if (Client.cls.demonum != -1) { Client.NextDemo( ); } else { Client.Disconnect( ); } throw new EndGameException( ); //longjmp (host_old_abortserver, 1); }
// Host_Startdemos_f private static void Startdemos_f() { if (Client.cls.state == cactive_t.ca_dedicated) { if (!Server.sv.active) { Cbuf.AddText("map start\n"); } return; } int c = Cmd.Argc - 1; if (c > Client.MAX_DEMOS) { Con.Print("Max {0} demos in demoloop\n", Client.MAX_DEMOS); c = Client.MAX_DEMOS; } Con.Print("{0} demo(s) in loop\n", c); for (int i = 1; i < c + 1; i++) { Client.cls.demos[i - 1] = Common.Copy(Cmd.Argv(i), Client.MAX_DEMONAME); } if (!Server.sv.active && Client.cls.demonum != -1 && !Client.cls.demoplayback) { Client.cls.demonum = 0; Client.NextDemo(); } else { Client.cls.demonum = -1; } }
/// <summary> /// Host_EndGame /// </summary> public static void EndGame(string message, params object[] args) { string str = String.Format(message, args); Con.DPrint("Host_EndGame: {0}\n", str); if (Server.IsActive) { Host.ShutdownServer(false); } if (Client.Cls.state == ClientActivityState.Dedicated) { Sys.Error("Host_EndGame: {0}\n", str); // dedicated servers exit } if (Client.Cls.demonum != -1) { Client.NextDemo(); } else { Client.Disconnect(); } throw new EndGameException(); //longjmp (host_abortserver, 1); }
/// <summary> /// Host_Demos_f /// Return to looping demos /// </summary> private static void Demos_f() { if (Client.cls.state == cactive_t.ca_dedicated) { return; } if (Client.cls.demonum == -1) { Client.cls.demonum = 1; } Client.Disconnect_f(); Client.NextDemo(); }
/// <summary> /// Host_Demos_f /// Return to looping demos /// </summary> static void Demos_f() { if (Client.Cls.state == ClientActivityState.Dedicated) { return; } if (Client.Cls.demonum == -1) { Client.Cls.demonum = 1; } Client.Disconnect_f(); Client.NextDemo(); }