Skip to content
This repository was archived by the owner on Sep 5, 2022. It is now read-only.

Commit 011f562

Browse files
committed
Removed server check for single node setups.
1 parent e40cf72 commit 011f562

File tree

1 file changed

+12
-19
lines changed

1 file changed

+12
-19
lines changed

UnityProject/Assets/Mirror/Runtime/Transport/LRM/LRMTransport/LRMTransportOverrides.cs

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -74,28 +74,21 @@ public override void ClientConnect(string address)
7474

7575
if (!useLoadBalancer)
7676
{
77-
if (room.HasValue && room.Value.relayInfo.Address == serverIP)
78-
{
79-
int pos = 0;
80-
_directConnected = false;
81-
_clientSendBuffer.WriteByte(ref pos, (byte)OpCodes.JoinServer);
82-
_clientSendBuffer.WriteString(ref pos, address);
83-
_clientSendBuffer.WriteBool(ref pos, _directConnectModule != null);
77+
int pos = 0;
78+
_directConnected = false;
79+
_clientSendBuffer.WriteByte(ref pos, (byte)OpCodes.JoinServer);
80+
_clientSendBuffer.WriteString(ref pos, address);
81+
_clientSendBuffer.WriteBool(ref pos, _directConnectModule != null);
8482

85-
if (GetLocalIp() == null)
86-
_clientSendBuffer.WriteString(ref pos, "0.0.0.0");
87-
else
88-
_clientSendBuffer.WriteString(ref pos, GetLocalIp());
83+
if (GetLocalIp() == null)
84+
_clientSendBuffer.WriteString(ref pos, "0.0.0.0");
85+
else
86+
_clientSendBuffer.WriteString(ref pos, GetLocalIp());
8987

90-
_isClient = true;
88+
_isClient = true;
89+
90+
clientToServerTransport.ClientSend(0, new System.ArraySegment<byte>(_clientSendBuffer, 0, pos));
9191

92-
clientToServerTransport.ClientSend(0, new System.ArraySegment<byte>(_clientSendBuffer, 0, pos));
93-
}
94-
else
95-
{
96-
OnClientDisconnected?.Invoke();
97-
Debug.LogWarning("LRM | Client tried to join server that doesnt exist!");
98-
}
9992
}
10093
else
10194
{

0 commit comments

Comments
 (0)