Allow non-hosts to open the map chooser
This commit is contained in:
@@ -155,7 +155,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
var mapButton = lobby.GetOrNull<ButtonWidget>("CHANGEMAP_BUTTON");
|
||||
if (mapButton != null)
|
||||
{
|
||||
mapButton.IsDisabled = configurationDisabled;
|
||||
mapButton.IsDisabled = () => gameStarting || panel == PanelType.Kick || panel == PanelType.ForceStart ||
|
||||
orderManager.LocalClient == null || orderManager.LocalClient.IsReady;
|
||||
mapButton.OnClick = () =>
|
||||
{
|
||||
var onSelect = new Action<string>(uid =>
|
||||
@@ -173,7 +174,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
{ "initialMap", Map.Uid },
|
||||
{ "onExit", DoNothing },
|
||||
{ "onSelect", onSelect },
|
||||
{ "onSelect", Game.IsHost ? onSelect : null },
|
||||
{ "filter", MapVisibility.Lobby },
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user