From e13e0792f6a9d7b407a5964d11ed1be867c87f8a Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Fri, 5 Feb 2016 21:31:17 +0000 Subject: [PATCH] Remove unnecessary Map usage from MainMenuLogic. --- OpenRA.Mods.Common/Widgets/Logic/MainMenuLogic.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/OpenRA.Mods.Common/Widgets/Logic/MainMenuLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/MainMenuLogic.cs index 2d9d82bed4..65afcae84c 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/MainMenuLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/MainMenuLogic.cs @@ -167,7 +167,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic var onSelect = new Action(uid => { RemoveShellmapUI(); - LoadMapIntoEditor(Game.ModData.MapCache[uid].Map); + LoadMapIntoEditor(Game.ModData.MapCache[uid].Uid); }); var newMapButton = widget.Get("NEW_MAP_BUTTON"); @@ -242,12 +242,12 @@ namespace OpenRA.Mods.Common.Widgets.Logic }); } - void LoadMapIntoEditor(Map map) + void LoadMapIntoEditor(string uid) { ConnectionLogic.Connect(IPAddress.Loopback.ToString(), - Game.CreateLocalServer(map.Uid), + Game.CreateLocalServer(uid), "", - () => { Game.LoadEditor(map.Uid); }, + () => { Game.LoadEditor(uid); }, () => { Game.CloseServer(); SwitchMenu(MenuType.MapEditor); }); }