diff --git a/OpenRA.Game/Graphics/Viewport.cs b/OpenRA.Game/Graphics/Viewport.cs index 9f8f151449..1f7330b76c 100644 --- a/OpenRA.Game/Graphics/Viewport.cs +++ b/OpenRA.Game/Graphics/Viewport.cs @@ -33,7 +33,6 @@ namespace OpenRA.Graphics public int Width { get { return (int)screenSize.X; } } public int Height { get { return (int)screenSize.Y; } } - SpriteRenderer cursorRenderer; int2 mousePos; float cursorFrame = 0f; @@ -48,7 +47,6 @@ namespace OpenRA.Graphics { this.screenSize = screenSize; this.renderer = renderer; - cursorRenderer = renderer.SpriteRenderer; this.scrollPosition = Game.CellSize* mapStart; } diff --git a/OpenRA.Game/Server/Server.cs b/OpenRA.Game/Server/Server.cs index 0fc9b16d1d..9c63abef29 100644 --- a/OpenRA.Game/Server/Server.cs +++ b/OpenRA.Game/Server/Server.cs @@ -431,6 +431,7 @@ namespace OpenRA.Server DropClient(conns.ElementAt(conns.Count() - 1), null); if (listener != null) listener.Stop(); + GameStarted = false; } static void SyncLobbyInfo() diff --git a/OpenRA.Game/Widgets/Delegates/ConnectionDialogsDelegate.cs b/OpenRA.Game/Widgets/Delegates/ConnectionDialogsDelegate.cs index f519ab41e7..bef03f0898 100644 --- a/OpenRA.Game/Widgets/Delegates/ConnectionDialogsDelegate.cs +++ b/OpenRA.Game/Widgets/Delegates/ConnectionDialogsDelegate.cs @@ -55,6 +55,7 @@ namespace OpenRA.Widgets.Delegates case ConnectionState.Connected: r.OpenWindow("SERVER_LOBBY"); r.GetWidget("SERVER_LOBBY").GetWidget("CHAT_DISPLAY").ClearChat(); + r.GetWidget("INGAME_ROOT").GetWidget("CHAT_DISPLAY").ClearChat(); break; } }; diff --git a/OpenRA.Game/Widgets/Delegates/IngameChromeDelegate.cs b/OpenRA.Game/Widgets/Delegates/IngameChromeDelegate.cs index 7015c5fcfe..8e960ca1a0 100644 --- a/OpenRA.Game/Widgets/Delegates/IngameChromeDelegate.cs +++ b/OpenRA.Game/Widgets/Delegates/IngameChromeDelegate.cs @@ -29,7 +29,9 @@ namespace OpenRA.Widgets.Delegates }; optionsBG.GetWidget("BUTTON_DISCONNECT").OnMouseUp = mi => { - optionsBG.Visible = false; + optionsBG.Visible = false; + if (Game.IsHost) + Server.Server.CloseServer(); Game.Disconnect(); return true; };