Port back to Mono.Nat and make discovery async.

This commit is contained in:
Matthias Mailänder
2021-03-23 19:24:51 +01:00
committed by Paul Chote
parent 3f510b6d93
commit d15e7f76fc
13 changed files with 134 additions and 128 deletions

View File

@@ -14,6 +14,7 @@ using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Threading;
using OpenRA.Network;
using OpenRA.Support;
namespace OpenRA.Server
@@ -56,6 +57,8 @@ namespace OpenRA.Server
Game.InitializeSettings(arguments);
var settings = Game.Settings.Server;
Nat.Initialize();
var envModSearchPaths = Environment.GetEnvironmentVariable("MOD_SEARCH_PATHS");
var modSearchPaths = !string.IsNullOrWhiteSpace(envModSearchPaths) ?
FieldLoader.GetValue<string[]>("MOD_SEARCH_PATHS", envModSearchPaths) :