mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
NetworkClient.AddPlayer: remove dependency on .readyConnection. the code has a '!ready' check before. so by definition, .readyConnection == .connection here.
This commit is contained in:
parent
d299d607eb
commit
4c7a5d64a5
@ -837,14 +837,14 @@ public static bool AddPlayer(NetworkConnection readyConn)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (readyConnection.identity != null)
|
||||
if (connection.identity != null)
|
||||
{
|
||||
Debug.LogError("NetworkClient.AddPlayer: a PlayerController was already added. Did you call AddPlayer twice?");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Debug.Log("NetworkClient.AddPlayer() called with connection [" + readyConnection + "]");
|
||||
readyConnection.Send(new AddPlayerMessage());
|
||||
connection.Send(new AddPlayerMessage());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user