Remove secondary AllowPortForward setting.

The global setting is fine, and this simplifies
both the code and the UI.
This commit is contained in:
Paul Chote
2017-12-22 13:13:50 +00:00
committed by abcdefg30
parent 38cb3dea05
commit 205c45198c
7 changed files with 14 additions and 84 deletions

View File

@@ -327,13 +327,8 @@ namespace OpenRA
GeoIP.Initialize();
if (!Settings.Server.DiscoverNatDevices)
Settings.Server.AllowPortForward = false;
else
{
if (Settings.Server.DiscoverNatDevices)
discoverNat = UPnP.DiscoverNatDevices(Settings.Server.NatDiscoveryTimeout);
Settings.Server.AllowPortForward = true;
}
var modSearchArg = args.GetValue("Engine.ModSearchPaths", null);
var modSearchPaths = modSearchArg != null ?
@@ -461,7 +456,6 @@ namespace OpenRA
{
Console.WriteLine("NAT discovery failed: {0}", e.Message);
Log.Write("nat", e.ToString());
Settings.Server.AllowPortForward = false;
}
ModData.LoadScreen.StartGame(args);
@@ -871,8 +865,7 @@ namespace OpenRA
{
Name = "Skirmish Game",
Map = map,
AdvertiseOnline = false,
AllowPortForward = false
AdvertiseOnline = false
};
server = new Server.Server(new IPEndPoint(IPAddress.Loopback, 0), settings, ModData, false);