Kick clients who don't have the map when the host force-starts.

This commit is contained in:
Paul Chote
2014-03-13 17:07:41 +13:00
parent f5f84244eb
commit fcb3d7347a
6 changed files with 41 additions and 18 deletions

View File

@@ -530,6 +530,9 @@ namespace OpenRA.Mods.RA.Widgets.Logic
if (Map.Status == MapStatus.Available)
{
// Tell the server that we have the map
orderManager.IssueOrder(Order.Command("state {0}".F(Session.ClientState.NotReady)));
// Restore default starting cash if the last map set it to something invalid
var pri = Rules.Info["player"].Traits.Get<PlayerResourcesInfo>();
if (!Map.Map.Options.StartingCash.HasValue && !pri.SelectableCash.Contains(orderManager.LobbyInfo.GlobalSettings.StartingCash))