Fix opening up skirmish menu making it impossible to leave map editor
This commit is contained in:
committed by
Matthias Mailänder
parent
b3b82b97ea
commit
a9e5744a37
@@ -251,6 +251,16 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
var iop = world.WorldActor.TraitsImplementing<IObjectivesPanel>().FirstOrDefault();
|
var iop = world.WorldActor.TraitsImplementing<IObjectivesPanel>().FirstOrDefault();
|
||||||
var exitDelay = iop?.ExitDelay ?? 0;
|
var exitDelay = iop?.ExitDelay ?? 0;
|
||||||
var mpe = world.WorldActor.TraitOrDefault<MenuPostProcessEffect>();
|
var mpe = world.WorldActor.TraitOrDefault<MenuPostProcessEffect>();
|
||||||
|
|
||||||
|
// HACK: Opening up skirmish menu can mess up the OrderManager.
|
||||||
|
if (!Game.IsCurrentWorld(world))
|
||||||
|
{
|
||||||
|
Game.Disconnect();
|
||||||
|
Ui.ResetAll();
|
||||||
|
Game.LoadShellMap();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (mpe != null)
|
if (mpe != null)
|
||||||
{
|
{
|
||||||
Game.RunAfterDelay(exitDelay, () =>
|
Game.RunAfterDelay(exitDelay, () =>
|
||||||
|
|||||||
Reference in New Issue
Block a user