diff --git a/OpenRa.Game/Chrome.cs b/OpenRa.Game/Chrome.cs index 346040d42c..4690b738af 100644 --- a/OpenRa.Game/Chrome.cs +++ b/OpenRa.Game/Chrome.cs @@ -431,9 +431,8 @@ namespace OpenRa world.Minimap.Draw(minimapRect, true); world.Minimap.DrawSpawnPoints(minimapRect); - if (Game.world.LocalPlayer.Index == 0) + if (Game.IsHost) { - // we are host AddUiButton(new int2(r.Right - 100, r.Top + 300), "Change Map", _ => { diff --git a/OpenRa.Game/Game.cs b/OpenRa.Game/Game.cs index db1b55d8bc..a094dd4111 100644 --- a/OpenRa.Game/Game.cs +++ b/OpenRa.Game/Game.cs @@ -324,6 +324,11 @@ namespace OpenRa // throw new InvalidOperationException( "Desync in OnKeyDown" ); } + public static bool IsHost + { + get { return orderManager.Connection.LocalClientId == 0; } + } + public static void HandleKeyPress( KeyPressEventArgs e, Modifiers modifiers ) { int sync = Game.world.SyncHash();