Fix kicking players joining servers hosting a map with non-default rules

Specifically, rules that remove traits which implement ILobbyOptions
This commit is contained in:
Oliver Brakmann
2016-09-14 20:14:15 +02:00
parent 634faa31de
commit 082ccfe5d6

View File

@@ -35,8 +35,10 @@ namespace OpenRA.Mods.Common.Server
foreach (var kv in server.LobbyInfo.GlobalSettings.LobbyOptions)
{
Session.LobbyOptionState def;
LobbyOption option;
if (!defaults.LobbyOptions.TryGetValue(kv.Key, out def) || kv.Value.Value != def.Value)
server.SendOrderTo(conn, "Message", options[kv.Key].Name + ": " + kv.Value.Value);
if (options.TryGetValue(kv.Key, out option))
server.SendOrderTo(conn, "Message", option.Name + ": " + kv.Value.Value);
}
}
}