From 9516a6af69cdf6ecc1d265aac9a118c147f2e46c Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sun, 12 Feb 2017 18:48:03 +0000 Subject: [PATCH] Fix game server compatibility check. --- OpenRA.Game/Network/GameServer.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/OpenRA.Game/Network/GameServer.cs b/OpenRA.Game/Network/GameServer.cs index 0ef4ac4c3a..f8e3e64024 100644 --- a/OpenRA.Game/Network/GameServer.cs +++ b/OpenRA.Game/Network/GameServer.cs @@ -48,19 +48,19 @@ namespace OpenRA.Network ModId = modVersion[0]; ModVersion = modVersion[1]; - if (Game.Mods.TryGetValue(modVersion[0], out mod)) - { - ModLabel = "{0} ({1})".F(mod.Metadata.Title, modVersion[1]); - IsCompatible = Game.Settings.Debug.IgnoreVersionMismatch || ModVersion == mod.Metadata.Version; - } - var externalKey = ExternalMod.MakeKey(modVersion[0], modVersion[1]); - if (!IsCompatible && Game.ExternalMods.TryGetValue(externalKey, out external) + if (Game.ExternalMods.TryGetValue(externalKey, out external) && external.Version == modVersion[1]) { ModLabel = "{0} ({1})".F(external.Title, external.Version); IsCompatible = true; } + else if (Game.Mods.TryGetValue(modVersion[0], out mod)) + { + // Use internal mod data to populate the section header, but + // on-connect switching must use the external mod plumbing. + ModLabel = "{0} ({1})".F(mod.Metadata.Title, modVersion[1]); + } } var mapAvailable = Game.Settings.Game.AllowDownloading || Game.ModData.MapCache[Map].Status == MapStatus.Available;