diff --git a/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs index d3cafc1c14..8f2faecb9a 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs @@ -131,8 +131,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic { { "orderManager", orderManager }, { "getMap", (Func)(() => map) }, - { "onMouseDown", (Action)((preview, map, mi) => LobbyUtils.SelectSpawnPoint(orderManager, preview, map, mi)) }, - { "getSpawnOccupants", (Func>)(map => LobbyUtils.GetSpawnOccupants(orderManager.LobbyInfo, map)) }, + { "onMouseDown", (Action)((preview, mapPreview, mi) => + LobbyUtils.SelectSpawnPoint(orderManager, preview, mapPreview, mi)) }, + { "getSpawnOccupants", (Func>)(mapPreview => LobbyUtils.GetSpawnOccupants(orderManager.LobbyInfo, mapPreview)) }, }); UpdateCurrentMap(); @@ -380,9 +381,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic }; var allOptions = new CachedTransform( - map => map.Rules.Actors["player"].TraitInfos() - .Concat(map.Rules.Actors["world"].TraitInfos()) - .SelectMany(t => t.LobbyOptions(map.Rules)) + mapPreview => mapPreview.Rules.Actors["player"].TraitInfos() + .Concat(mapPreview.Rules.Actors["world"].TraitInfos()) + .SelectMany(t => t.LobbyOptions(mapPreview.Rules)) .ToArray()); foreach (var kv in optionDropdowns) @@ -394,7 +395,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic gs => gs.LobbyOptions[kv.Value]); var option = new CachedTransform( - map => allOptions.Update(map).FirstOrDefault(o => o.Id == kv.Value)); + mapPreview => allOptions.Update(mapPreview).FirstOrDefault(o => o.Id == kv.Value)); var getOptionLabel = new CachedTransform(id => { diff --git a/OpenRA.Mods.Common/Widgets/Logic/ReplayBrowserLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/ReplayBrowserLogic.cs index a6c9c8320b..8c003d2635 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/ReplayBrowserLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/ReplayBrowserLogic.cs @@ -78,8 +78,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic { { "orderManager", null }, { "getMap", (Func)(() => map) }, - { "onMouseDown", (Action)((preview, map, mi) => { }) }, - { "getSpawnOccupants", (Func>)(map => LobbyUtils.GetSpawnOccupants(selectedReplay.GameInfo.Players, map)) }, + { "onMouseDown", (Action)((preview, mapPreview, mi) => { }) }, + { "getSpawnOccupants", (Func>)(mapPreview => + LobbyUtils.GetSpawnOccupants(selectedReplay.GameInfo.Players, mapPreview)) }, }); var replayDuration = new CachedTransform(r =>