From 9743945c3e233d022e5f616f8346b5fc83331ddd Mon Sep 17 00:00:00 2001 From: mischa Date: Tue, 24 Sep 2024 15:27:01 +0200 Subject: [PATCH] Revert "accept any channel" This reverts commit cc1d59dc6c3e949a47d9c96c1d74db34e2e5c056. --- Assets/Mirror/Core/NetworkClient.cs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Assets/Mirror/Core/NetworkClient.cs b/Assets/Mirror/Core/NetworkClient.cs index 81f226eb5..76ad01213 100644 --- a/Assets/Mirror/Core/NetworkClient.cs +++ b/Assets/Mirror/Core/NetworkClient.cs @@ -1409,11 +1409,11 @@ static void OnEntityStateMessage(EntityStateMessage message) static void OnEntityStateMessageUnreliableBaseline(EntityStateMessageUnreliableBaseline message, int channelId) { // safety check: baseline should always arrive over Reliable channel. - // if (channelId != Channels.Reliable) - // { - // Debug.LogError($"Client OnEntityStateMessageUnreliableBaseline arrived on channel {channelId} instead of Reliable. This should never happen!"); - // return; - // } + if (channelId != Channels.Reliable) + { + Debug.LogError($"Client OnEntityStateMessageUnreliableBaseline arrived on channel {channelId} instead of Reliable. This should never happen!"); + return; + } // Debug.Log($"NetworkClient.OnUpdateVarsMessage {msg.netId}"); if (spawned.TryGetValue(message.netId, out NetworkIdentity identity) && identity != null) @@ -1435,11 +1435,11 @@ static void OnEntityStateMessageUnreliableBaseline(EntityStateMessageUnreliableB static void OnEntityStateMessageUnreliableDelta(EntityStateMessageUnreliableDelta message, int channelId) { // safety check: baseline should always arrive over Reliable channel. - // if (channelId != Channels.Unreliable) - // { - // Debug.LogError($"Client OnEntityStateMessageUnreliableDelta arrived on channel {channelId} instead of Unreliable. This should never happen!"); - // return; - // } + if (channelId != Channels.Unreliable) + { + Debug.LogError($"Client OnEntityStateMessageUnreliableDelta arrived on channel {channelId} instead of Unreliable. This should never happen!"); + return; + } // Debug.Log($"NetworkClient.OnUpdateVarsMessage {msg.netId}"); if (spawned.TryGetValue(message.netId, out NetworkIdentity identity) && identity != null)