From 4269fc67d501a2b5504eb5eeeef7b3ec5924ffcd Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Wed, 15 Sep 2021 19:04:49 +0200 Subject: [PATCH] Remove hacks around checking sync while disposing the shellmap --- OpenRA.Mods.Common/Widgets/Logic/Editor/NewMapLogic.cs | 4 +--- OpenRA.Mods.Common/Widgets/Logic/MainMenuLogic.cs | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/OpenRA.Mods.Common/Widgets/Logic/Editor/NewMapLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Editor/NewMapLogic.cs index fbcc81dc26..10a7b8c974 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Editor/NewMapLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Editor/NewMapLogic.cs @@ -70,9 +70,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic Action afterSave = uid => { - // 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(() => Game.LoadEditor(uid)); + Game.LoadEditor(uid); Ui.CloseWindow(); onSelect(uid); diff --git a/OpenRA.Mods.Common/Widgets/Logic/MainMenuLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/MainMenuLogic.cs index 1b689a5260..e2fda1881e 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/MainMenuLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/MainMenuLogic.cs @@ -343,9 +343,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic void LoadMapIntoEditor(string uid) { - // 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(() => Game.LoadEditor(uid)); + Game.LoadEditor(uid); DiscordService.UpdateStatus(DiscordState.InMapEditor);