Do not keep map pakages loaded on Game start to reduce memory impact

This commit is contained in:
chacha
2024-04-24 13:27:20 +02:00
committed by Gustas
parent affc98851c
commit e5a7b6e795
6 changed files with 30 additions and 10 deletions

View File

@@ -985,7 +985,7 @@ namespace OpenRA
Order.Command($"state {Session.ClientState.Ready}")
};
var map = ModData.MapCache.SingleOrDefault(m => m.Uid == launchMap || Path.GetFileName(m.Package.Name) == launchMap);
var map = ModData.MapCache.SingleOrDefault(m => m.Uid == launchMap || Path.GetFileName(m.PackageName) == launchMap);
if (map == null)
throw new ArgumentException($"Could not find map '{launchMap}'.");