enhanced UPnP discovery usability

- don't search for NATs forever, 5 seconds seem to be enough
- disable the UPnP checkbox if discovery failed
- no computer industry acronyms in user GUI
- don't remove port-forwarding twice, just once on shutdown
- user-configurable settings for debugging
This commit is contained in:
Matthias Mailänder
2013-04-06 12:54:41 +02:00
parent 083d59613a
commit 0488903a15
6 changed files with 30 additions and 10 deletions

View File

@@ -29,7 +29,10 @@ namespace OpenRA.GameRules
public int ExternalPort = 1234;
public bool AdvertiseOnline = true;
public string MasterServer = "http://master.open-ra.org/";
public bool AllowUPnP = true;
public bool AllowUPnP = true; // let the user disable it
public bool NatDeviceAvailable = false; // internal check if discovery succeeded
public int NatDiscoveryTimeout = 1000; // ms to search for UPnP enabled NATs
public bool VerboseNatDiscovery = false; // print very detailed logs for debugging
public bool AllowCheats = false;
public string Map = null;
public string[] Ban = null;
@@ -49,6 +52,9 @@ namespace OpenRA.GameRules
AdvertiseOnline = other.AdvertiseOnline;
MasterServer = other.MasterServer;
AllowUPnP = other.AllowUPnP;
NatDeviceAvailable = other.NatDeviceAvailable;
NatDiscoveryTimeout = other.NatDiscoveryTimeout;
VerboseNatDiscovery = other.VerboseNatDiscovery;
AllowCheats = other.AllowCheats;
Map = other.Map;
Ban = other.Ban;