From d69deba56f3cb8a8e555ad89b5fa776319259a98 Mon Sep 17 00:00:00 2001 From: Gustas <37534529+PunkPun@users.noreply.github.com> Date: Mon, 3 Nov 2025 16:31:47 +0200 Subject: [PATCH] Use lobby option cache for suppressing old options --- OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs index 5b795461e4..f92bf79f0f 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs @@ -684,10 +684,12 @@ namespace OpenRA.Mods.Common.Widgets.Logic .Concat(map.WorldActorInfo.TraitInfos()) .SelectMany(t => t.LobbyOptions(map)); - lobbyOptions = orderManager.LobbyInfo.GlobalSettings.LobbyOptions; + var newLobbyOptions = orderManager.LobbyInfo.GlobalSettings.LobbyOptions; foreach (var o in allOptions) - if (lobbyOptions.TryGetValue(o.Id, out var s) && s.Value != o.DefaultValue) + if (newLobbyOptions.TryGetValue(o.Id, out var s) && (lobbyOptions.TryGetValue(o.Id, out var old) ? s.Value != old.Value : s.Value != o.DefaultValue)) TextNotificationsManager.AddSystemLine(OptionValue, "name", o.Name, "value", o.Label(s.Value)); + + lobbyOptions = newLobbyOptions; } void UpdateCurrentMap()