Don’t crash if a replay can’t be loaded.
This commit is contained in:
@@ -93,6 +93,15 @@ namespace OpenRA.Network
|
|||||||
|
|
||||||
case "StartGame":
|
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.AddChatLine(Color.White, "Server", "The game has started.");
|
||||||
Game.StartGame(orderManager.LobbyInfo.GlobalSettings.Map, false);
|
Game.StartGame(orderManager.LobbyInfo.GlobalSettings.Map, false);
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user