Do not keep map pakages loaded on Game start to reduce memory impact
This commit is contained in:
@@ -247,7 +247,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
if (map.Package?.Name != combinedPath)
|
||||
{
|
||||
// When creating a new map or when file paths don't match
|
||||
if (modData.MapCache.Any(m => m.Status == MapStatus.Available && m.Package?.Name == combinedPath))
|
||||
if (modData.MapCache.Any(m => m.Status == MapStatus.Available && m.PackageName == combinedPath))
|
||||
{
|
||||
ConfirmationDialogs.ButtonPrompt(modData,
|
||||
title: OverwriteMapFailedTitle,
|
||||
|
||||
@@ -141,7 +141,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
.Select(p => new
|
||||
{
|
||||
Preview = p,
|
||||
Index = missionMapPaths.IndexOf(Path.GetFileName(p.Package.Name))
|
||||
Index = missionMapPaths.IndexOf(Path.GetFileName(p.PackageName))
|
||||
})
|
||||
.Where(x => x.Index != -1)
|
||||
.OrderBy(x => x.Index)
|
||||
|
||||
Reference in New Issue
Block a user