Merge pull request #10939 from pchote/fix-map-install-kick

Notify the server after installing a map.
This commit is contained in:
Matthias Mailänder
2016-03-21 20:37:12 +01:00
2 changed files with 5 additions and 3 deletions

View File

@@ -99,7 +99,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic
var install = download.GetOrNull<ButtonWidget>("MAP_INSTALL");
if (install != null)
{
install.OnClick = () => lobby.Map.Install();
install.OnClick = () => lobby.Map.Install(
() => orderManager.IssueOrder(Order.Command("state {0}".F(Session.ClientState.NotReady))));
install.IsHighlighted = () => installHighlighted;
}
}
@@ -160,7 +161,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
retry.OnClick = () =>
{
if (lobby.Map.Status == MapStatus.DownloadError)
lobby.Map.Install();
lobby.Map.Install(() => orderManager.IssueOrder(Order.Command("state {0}".F(Session.ClientState.NotReady))));
else if (lobby.Map.Status == MapStatus.Unavailable)
modData.MapCache.QueryRemoteMapDetails(new[] { lobby.Map.Uid });
};