Removed server check for single node setups.
This commit is contained in:
parent
e40cf72757
commit
011f562e63
1 changed files with 13 additions and 20 deletions
|
|
@ -74,28 +74,21 @@ namespace LightReflectiveMirror
|
||||||
|
|
||||||
if (!useLoadBalancer)
|
if (!useLoadBalancer)
|
||||||
{
|
{
|
||||||
if (room.HasValue && room.Value.relayInfo.Address == serverIP)
|
int pos = 0;
|
||||||
{
|
_directConnected = false;
|
||||||
int pos = 0;
|
_clientSendBuffer.WriteByte(ref pos, (byte)OpCodes.JoinServer);
|
||||||
_directConnected = false;
|
_clientSendBuffer.WriteString(ref pos, address);
|
||||||
_clientSendBuffer.WriteByte(ref pos, (byte)OpCodes.JoinServer);
|
_clientSendBuffer.WriteBool(ref pos, _directConnectModule != null);
|
||||||
_clientSendBuffer.WriteString(ref pos, address);
|
|
||||||
_clientSendBuffer.WriteBool(ref pos, _directConnectModule != null);
|
|
||||||
|
|
||||||
if (GetLocalIp() == null)
|
if (GetLocalIp() == null)
|
||||||
_clientSendBuffer.WriteString(ref pos, "0.0.0.0");
|
_clientSendBuffer.WriteString(ref pos, "0.0.0.0");
|
||||||
else
|
|
||||||
_clientSendBuffer.WriteString(ref pos, GetLocalIp());
|
|
||||||
|
|
||||||
_isClient = true;
|
|
||||||
|
|
||||||
clientToServerTransport.ClientSend(0, new System.ArraySegment<byte>(_clientSendBuffer, 0, pos));
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
_clientSendBuffer.WriteString(ref pos, GetLocalIp());
|
||||||
OnClientDisconnected?.Invoke();
|
|
||||||
Debug.LogWarning("LRM | Client tried to join server that doesnt exist!");
|
_isClient = true;
|
||||||
}
|
|
||||||
|
clientToServerTransport.ClientSend(0, new System.ArraySegment<byte>(_clientSendBuffer, 0, pos));
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue