Revert "accept any channel"

This reverts commit cc1d59dc6c.
This commit is contained in:
mischa 2024-09-24 15:27:01 +02:00
parent fdc653b273
commit 9743945c3e

View File

@ -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)