Fix slight logic error with difficulty

This commit is contained in:
Scott_NZ
2012-12-11 14:33:54 +13:00
parent a8dbedd486
commit 3ff3ed39fb

View File

@@ -500,10 +500,12 @@ namespace OpenRA.Mods.RA.Server
.ToDictionary(s => s.PlayerReference, s => s);
if (server.Map.Difficulties != null && server.Map.Difficulties.Any())
{
if (!server.Map.Difficulties.Contains(server.lobbyInfo.GlobalSettings.Difficulty))
server.lobbyInfo.GlobalSettings.Difficulty = server.Map.Difficulties.First();
else
server.lobbyInfo.GlobalSettings.Difficulty = null;
}
else
server.lobbyInfo.GlobalSettings.Difficulty = null;
}
}
}