Remember to disconnect ingame too, and mark the game as not started.
Also fix a compiler warning
This commit is contained in:
@@ -33,7 +33,6 @@ namespace OpenRA.Graphics
|
|||||||
public int Width { get { return (int)screenSize.X; } }
|
public int Width { get { return (int)screenSize.X; } }
|
||||||
public int Height { get { return (int)screenSize.Y; } }
|
public int Height { get { return (int)screenSize.Y; } }
|
||||||
|
|
||||||
SpriteRenderer cursorRenderer;
|
|
||||||
int2 mousePos;
|
int2 mousePos;
|
||||||
float cursorFrame = 0f;
|
float cursorFrame = 0f;
|
||||||
|
|
||||||
@@ -48,7 +47,6 @@ namespace OpenRA.Graphics
|
|||||||
{
|
{
|
||||||
this.screenSize = screenSize;
|
this.screenSize = screenSize;
|
||||||
this.renderer = renderer;
|
this.renderer = renderer;
|
||||||
cursorRenderer = renderer.SpriteRenderer;
|
|
||||||
|
|
||||||
this.scrollPosition = Game.CellSize* mapStart;
|
this.scrollPosition = Game.CellSize* mapStart;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -431,6 +431,7 @@ namespace OpenRA.Server
|
|||||||
DropClient(conns.ElementAt(conns.Count() - 1), null);
|
DropClient(conns.ElementAt(conns.Count() - 1), null);
|
||||||
if (listener != null)
|
if (listener != null)
|
||||||
listener.Stop();
|
listener.Stop();
|
||||||
|
GameStarted = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SyncLobbyInfo()
|
static void SyncLobbyInfo()
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ namespace OpenRA.Widgets.Delegates
|
|||||||
case ConnectionState.Connected:
|
case ConnectionState.Connected:
|
||||||
r.OpenWindow("SERVER_LOBBY");
|
r.OpenWindow("SERVER_LOBBY");
|
||||||
r.GetWidget("SERVER_LOBBY").GetWidget<ChatDisplayWidget>("CHAT_DISPLAY").ClearChat();
|
r.GetWidget("SERVER_LOBBY").GetWidget<ChatDisplayWidget>("CHAT_DISPLAY").ClearChat();
|
||||||
|
r.GetWidget("INGAME_ROOT").GetWidget<ChatDisplayWidget>("CHAT_DISPLAY").ClearChat();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -30,6 +30,8 @@ namespace OpenRA.Widgets.Delegates
|
|||||||
|
|
||||||
optionsBG.GetWidget("BUTTON_DISCONNECT").OnMouseUp = mi => {
|
optionsBG.GetWidget("BUTTON_DISCONNECT").OnMouseUp = mi => {
|
||||||
optionsBG.Visible = false;
|
optionsBG.Visible = false;
|
||||||
|
if (Game.IsHost)
|
||||||
|
Server.Server.CloseServer();
|
||||||
Game.Disconnect();
|
Game.Disconnect();
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user