NetworkClient.ConnectLocalServer: use the same order as Connect

This commit is contained in:
vis2k 2019-03-25 16:33:47 +01:00
parent 7bc320d098
commit 912572d6fe

View File

@ -82,6 +82,12 @@ public static void Connect(string ip)
// connect host mode
internal static void ConnectLocalServer()
{
if (LogFilter.Debug) Debug.Log("Client Connect Local Server");
active = true;
RegisterSystemHandlers(true);
connectState = ConnectState.Connected;
// create local connection to server
connection = new ULocalConnectionToServer();
SetHandlers(connection);
@ -90,11 +96,6 @@ internal static void ConnectLocalServer()
ULocalConnectionToClient connectionToClient = new ULocalConnectionToClient();
NetworkServer.SetLocalConnection(connectionToClient);
connectState = ConnectState.Connected;
active = true;
RegisterSystemHandlers(true);
localClientPacketQueue.Enqueue(MessagePacker.Pack(new ConnectMessage()));
}