Fix dedicated servers crashing on startup due to missing translations

This commit is contained in:
abcdefg30
2023-05-31 23:50:08 +02:00
committed by Gustas
parent 95f18d4bc3
commit 12e6932930

View File

@@ -86,6 +86,9 @@ namespace OpenRA.Server
modData.MapCache.LoadPreviewImages = false; // PERF: Server doesn't need previews, save memory by not loading them.
modData.MapCache.LoadMaps();
// HACK: Related to the above one, initialize the translations so we can load maps with their (translated) lobby options.
TranslationProvider.Initialize(modData, modData.DefaultFileSystem);
settings.Map = modData.MapCache.ChooseInitialMap(settings.Map, new MersenneTwister());
var endpoints = new List<IPEndPoint> { new IPEndPoint(IPAddress.IPv6Any, settings.ListenPort), new IPEndPoint(IPAddress.Any, settings.ListenPort) };