Fix OrderManager being deleted in map editor

This commit is contained in:
Gustas
2024-09-05 20:26:40 +03:00
committed by Matthias Mailänder
parent b070c0818f
commit ab6dc5db32
3 changed files with 2 additions and 2 deletions

View File

@@ -543,6 +543,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
if (map.Visibility == MapVisibility.Lobby)
{
// HACK: Server lobby should be usable without a server.
ConnectionLogic.Connect(Game.CreateLocalServer(uid),
"",
() => Game.OpenWindow("SERVER_LOBBY", new WidgetArgs

View File

@@ -473,7 +473,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
SwitchMenu(MenuType.None);
Game.OpenWindow("MISSIONBROWSER_PANEL", new WidgetArgs
{
{ "onExit", () => SwitchMenu(MenuType.Singleplayer) },
{ "onExit", () => { Game.Disconnect(); SwitchMenu(MenuType.Singleplayer); } },
{ "onStart", () => { RemoveShellmapUI(); lastGameState = MenuPanel.Missions; } },
{ "initialMap", map }
});

View File

@@ -199,7 +199,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic
widget.Get<ButtonWidget>("BACK_BUTTON").OnClick = () =>
{
StopVideo(videoPlayer);
Game.Disconnect();
Ui.CloseWindow();
onExit();
};