diff --git a/StompboxRemote/Program.cs b/StompboxRemote/Program.cs index f6f86e4..6f92a34 100644 --- a/StompboxRemote/Program.cs +++ b/StompboxRemote/Program.cs @@ -22,6 +22,6 @@ GameHost.IsMouseVisible = true; GameHost.StartGame(game); - StompboxClient.Instance.NeedUIReload = true; + client.Disconnect(); } diff --git a/StompboxShared/StompboxClient.cs b/StompboxShared/StompboxClient.cs index 14e76f5..28e4be3 100644 --- a/StompboxShared/StompboxClient.cs +++ b/StompboxShared/StompboxClient.cs @@ -149,6 +149,14 @@ public void Connect(string serverName, int port, Action connectCallback) } } + public void Disconnect() + { + if (InClientMode) + { + networkClient.Stop(); + } + } + void ConnectCallback(bool result) { if (result)