Správné vypnutí serveru v případě crashe z důvodu obsazeného portu, soubor na nastavení rozlišení, odstranění nepoužívané metody Enemy.SilentSpawn a implementace metody SoundManager.GetRandomisedPitchInstance

This commit is contained in:
Perry 2026-03-29 18:15:32 +02:00
parent 243f071a43
commit 8742f9eb55
10 changed files with 46 additions and 56 deletions

View file

@ -1,19 +1,8 @@
using System.Diagnostics;
using ONDServer.Net;
using ONDServer.Net;
namespace ONDServer;
public static class Program {
public static void Main(string[] args) {
if (args.Contains("--persistent")){
Server.AutoStop = false;
}
Server.Start(9012);
}
public static void Restart() {
Console.WriteLine("Game concluded -> restarting server");
Process.Start(new ProcessStartInfo{ FileName = Environment.ProcessPath, UseShellExecute = false });
Environment.Exit(0);
}
try{
Server.Start(9012);
}
finally{
Server.Stop();
}