diff --git a/UnityProject/Assets/Mirror/Runtime/Transport/LRM/LRMTransport/LRMTransportOverrides.cs b/UnityProject/Assets/Mirror/Runtime/Transport/LRM/LRMTransport/LRMTransportOverrides.cs index f2ddc91..7d56ec0 100644 --- a/UnityProject/Assets/Mirror/Runtime/Transport/LRM/LRMTransport/LRMTransportOverrides.cs +++ b/UnityProject/Assets/Mirror/Runtime/Transport/LRM/LRMTransport/LRMTransportOverrides.cs @@ -74,28 +74,21 @@ namespace LightReflectiveMirror if (!useLoadBalancer) { - if (room.HasValue && room.Value.relayInfo.Address == serverIP) - { - int pos = 0; - _directConnected = false; - _clientSendBuffer.WriteByte(ref pos, (byte)OpCodes.JoinServer); - _clientSendBuffer.WriteString(ref pos, address); - _clientSendBuffer.WriteBool(ref pos, _directConnectModule != null); + int pos = 0; + _directConnected = false; + _clientSendBuffer.WriteByte(ref pos, (byte)OpCodes.JoinServer); + _clientSendBuffer.WriteString(ref pos, address); + _clientSendBuffer.WriteBool(ref pos, _directConnectModule != null); - if (GetLocalIp() == null) - _clientSendBuffer.WriteString(ref pos, "0.0.0.0"); - else - _clientSendBuffer.WriteString(ref pos, GetLocalIp()); - - _isClient = true; - - clientToServerTransport.ClientSend(0, new System.ArraySegment(_clientSendBuffer, 0, pos)); - } + if (GetLocalIp() == null) + _clientSendBuffer.WriteString(ref pos, "0.0.0.0"); else - { - OnClientDisconnected?.Invoke(); - Debug.LogWarning("LRM | Client tried to join server that doesnt exist!"); - } + _clientSendBuffer.WriteString(ref pos, GetLocalIp()); + + _isClient = true; + + clientToServerTransport.ClientSend(0, new System.ArraySegment(_clientSendBuffer, 0, pos)); + } else {