From 5188a08c819a6175b107e5301e994db52b42d1c9 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Thu, 8 Dec 2016 20:49:28 +0000 Subject: [PATCH] Remove broken and disabled by default Server.TimeOut setting. --- OpenRA.Game/Server/Server.cs | 16 ---------------- OpenRA.Game/Settings.cs | 3 --- 2 files changed, 19 deletions(-) diff --git a/OpenRA.Game/Server/Server.cs b/OpenRA.Game/Server/Server.cs index 96f8af04ac..a361c474c7 100644 --- a/OpenRA.Game/Server/Server.cs +++ b/OpenRA.Game/Server/Server.cs @@ -22,8 +22,6 @@ using OpenRA.Network; using OpenRA.Primitives; using OpenRA.Support; -using XTimer = System.Timers.Timer; - namespace OpenRA.Server { public enum ServerState @@ -60,8 +58,6 @@ namespace OpenRA.Server readonly TcpListener listener; readonly TypeDictionary serverTraits = new TypeDictionary(); - XTimer gameTimeout; - protected volatile ServerState internalState = ServerState.WaitingPlayers; public ServerState State @@ -701,18 +697,6 @@ namespace OpenRA.Server foreach (var t in serverTraits.WithInterface()) t.GameStarted(this); - - // Check TimeOut - if (Settings.TimeOut > 10000) - { - gameTimeout = new XTimer(Settings.TimeOut); - gameTimeout.Elapsed += (_, e) => - { - Console.WriteLine("Timeout at {0}!!!", e.SignalTime); - Environment.Exit(0); - }; - gameTimeout.Enabled = true; - } } } } diff --git a/OpenRA.Game/Settings.cs b/OpenRA.Game/Settings.cs index 2ac48affb0..db8f32ecaf 100644 --- a/OpenRA.Game/Settings.cs +++ b/OpenRA.Game/Settings.cs @@ -68,9 +68,6 @@ namespace OpenRA [Desc("Takes a comma separated list of IP addresses that are not allowed to join.")] public string[] Ban = { }; - [Desc("Value in milliseconds when to terminate the game. Needs to be at least 10000 (10 s) to enable the timer.")] - public int TimeOut = 0; - [Desc("For dedicated servers only, controls whether a game can be started with just one human player in the lobby.")] public bool EnableSingleplayer = false;