From 566328530993356fb637eaf38f6b34a8f0c7d270 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Albin=20Cor=C3=A9n?= <2108U9@gmail.com> Date: Fri, 20 Apr 2018 12:35:33 +0200 Subject: [PATCH] Fixed issue causing the wrong clientId to get added --- .../Core/InternalMessageHandler.Receive.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MLAPI/NetworkingManagerComponents/Core/InternalMessageHandler.Receive.cs b/MLAPI/NetworkingManagerComponents/Core/InternalMessageHandler.Receive.cs index 1c3aecd..24cc620 100644 --- a/MLAPI/NetworkingManagerComponents/Core/InternalMessageHandler.Receive.cs +++ b/MLAPI/NetworkingManagerComponents/Core/InternalMessageHandler.Receive.cs @@ -78,7 +78,7 @@ namespace MLAPI.NetworkingManagerComponents.Core msDelay = 0; netManager.networkTime = netTime + (msDelay / 1000f); - netManager.connectedClients.Add(clientId, new NetworkedClient() { ClientId = clientId }); + netManager.connectedClients.Add(netManager.MyClientId, new NetworkedClient() { ClientId = netManager.MyClientId }); int clientCount = reader.ReadInt(); for (int i = 0; i < clientCount; i++) { @@ -128,7 +128,7 @@ namespace MLAPI.NetworkingManagerComponents.Core netManager._isClientConnected = true; if (netManager.OnClientConnectedCallback != null) - netManager.OnClientConnectedCallback.Invoke(clientId); + netManager.OnClientConnectedCallback.Invoke(netManager.MyClientId); } internal static void HandleAddObject(uint clientId, byte[] incommingData, int channelId)