From 9e18d3cceb99aac942b5033451710aee3eb6fe89 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sun, 21 Jun 2015 10:34:37 +0100 Subject: [PATCH] Work around an unsynced code check. --- .../Widgets/Logic/Editor/NewMapLogic.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/OpenRA.Mods.Common/Widgets/Logic/Editor/NewMapLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Editor/NewMapLogic.cs index 8810cb67fb..8448322063 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Editor/NewMapLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Editor/NewMapLogic.cs @@ -70,10 +70,15 @@ namespace OpenRA.Mods.Common.Widgets.Logic Action afterSave = uid => { - ConnectionLogic.Connect(System.Net.IPAddress.Loopback.ToString(), - Game.CreateLocalServer(uid), "", - () => Game.LoadEditor(uid), - () => { Game.CloseServer(); onExit(); }); + // HACK: Work around a synced-code change check. + // It's not clear why this is needed here, but not in the other places that load maps. + Game.RunAfterTick(() => + { + ConnectionLogic.Connect(System.Net.IPAddress.Loopback.ToString(), + Game.CreateLocalServer(uid), "", + () => Game.LoadEditor(uid), + () => { Game.CloseServer(); onExit(); }); + }); Ui.CloseWindow(); onSelect(uid);