auto-map-downloading updated. (sync)

This commit is contained in:
Igor Popov
2013-03-23 19:27:53 +04:00
parent aa6f12f0a1
commit 586723926a
5 changed files with 43 additions and 4 deletions

View File

@@ -118,7 +118,12 @@ namespace OpenRA.Network
throw new InvalidOperationException("Server's mod ({0}) and yours ({1}) don't match".F(localMods.FirstOrDefault().ToString().Split('@')[0], request.Mods.FirstOrDefault().ToString().Split('@')[0]));
// Check that the map exists on the client
if (!Game.modData.AvailableMaps.ContainsKey(request.Map))
throw new InvalidOperationException("Missing map {0}".F(request.Map));
{
if (Game.Settings.Game.AllowDownloading)
Game.DownloadMap(request.Map);
else
throw new InvalidOperationException("Missing map {0}".F(request.Map));
}
var info = new Session.Client()
{