Fix ready checkbox in the lobby being unusable after installing a map

This commit is contained in:
Oliver Brakmann
2016-04-11 22:25:18 +02:00
parent f911a80b04
commit b25eb81a42
4 changed files with 13 additions and 5 deletions

View File

@@ -109,8 +109,11 @@ namespace OpenRA.Mods.Common.Widgets.Logic
var install = download.GetOrNull<ButtonWidget>("MAP_INSTALL");
if (install != null)
{
install.OnClick = () => lobby.Map.Install(
() => orderManager.IssueOrder(Order.Command("state {0}".F(Session.ClientState.NotReady))));
install.OnClick = () => lobby.Map.Install(() =>
{
lobby.Map.PreloadRules();
Game.RunAfterTick(() => orderManager.IssueOrder(Order.Command("state {0}".F(Session.ClientState.NotReady))));
});
install.IsHighlighted = () => installHighlighted;
}
}