Merge pull request #10786 from pchote/mappreview-packages

Remove internal use of map paths.
This commit is contained in:
Oliver Brakmann
2016-02-23 22:52:54 +01:00
21 changed files with 172 additions and 174 deletions

View File

@@ -738,14 +738,15 @@ namespace OpenRA.Mods.Common.Widgets.Logic
if (MapPreview.Uid == uid)
return;
MapPreview = Game.ModData.MapCache[uid];
var modData = Game.ModData;
MapPreview = modData.MapCache[uid];
Map = null;
if (MapPreview.Status == MapStatus.Available)
{
// Maps need to be validated and pre-loaded before they can be accessed
new Thread(_ =>
{
var currentMap = Map = new Map(MapPreview.Path);
var currentMap = Map = new Map(modData, MapPreview.Package);
currentMap.PreloadRules();
Game.RunAfterTick(() =>
{