Don’t crash if a replay can’t be loaded.

This commit is contained in:
Paul Chote
2014-12-25 17:05:01 +13:00
parent 568a23e395
commit 2cdcd0f590

View File

@@ -93,6 +93,15 @@ namespace OpenRA.Network
case "StartGame":
{
if (Game.modData.MapCache[orderManager.LobbyInfo.GlobalSettings.Map].Status != MapStatus.Available)
{
Game.Disconnect();
Game.LoadShellMap();
// TODO: After adding a startup error dialog, notify the replay load failure.
break;
}
Game.AddChatLine(Color.White, "Server", "The game has started.");
Game.StartGame(orderManager.LobbyInfo.GlobalSettings.Map, false);
break;