Don't crash if the server mods don't match.
This allows the ingame dialog to be displayed.
This commit is contained in:
committed by
Matthias Mailänder
parent
3af1e47744
commit
f5d26bebb7
@@ -119,11 +119,8 @@ namespace OpenRA.Network
|
|||||||
case "HandshakeRequest":
|
case "HandshakeRequest":
|
||||||
{
|
{
|
||||||
var request = HandshakeRequest.Deserialize(order.TargetString);
|
var request = HandshakeRequest.Deserialize(order.TargetString);
|
||||||
var localMods = orderManager.LobbyInfo.GlobalSettings.Mods.Select(m => "{0}@{1}".F(m,Mod.AllMods[m].Version)).ToArray();
|
var localMods = orderManager.LobbyInfo.GlobalSettings.Mods.Select(m => "{0}@{1}".F(m, Mod.AllMods[m].Version)).ToArray();
|
||||||
|
|
||||||
// Check if mods match
|
|
||||||
if (localMods.FirstOrDefault().ToString().Split('@')[0] != request.Mods.FirstOrDefault().ToString().Split('@')[0])
|
|
||||||
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
|
// Check that the map exists on the client
|
||||||
if (!Game.modData.AvailableMaps.ContainsKey(request.Map))
|
if (!Game.modData.AvailableMaps.ContainsKey(request.Map))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user