mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
NetworkServer.InternalAddPlayerForConnection: rename playerGameObject parameter for consistency
This commit is contained in:
parent
75e51513db
commit
4f53f37dc8
@ -608,12 +608,12 @@ public static bool AddPlayerForConnection(NetworkConnection conn, GameObject pla
|
||||
return InternalAddPlayerForConnection(conn, player);
|
||||
}
|
||||
|
||||
internal static bool InternalAddPlayerForConnection(NetworkConnection conn, GameObject playerGameObject)
|
||||
internal static bool InternalAddPlayerForConnection(NetworkConnection conn, GameObject player)
|
||||
{
|
||||
NetworkIdentity identity = playerGameObject.GetComponent<NetworkIdentity>();
|
||||
NetworkIdentity identity = player.GetComponent<NetworkIdentity>();
|
||||
if (identity == null)
|
||||
{
|
||||
Debug.Log("AddPlayer: playerGameObject has no NetworkIdentity. Please add a NetworkIdentity to " + playerGameObject);
|
||||
Debug.Log("AddPlayer: playerGameObject has no NetworkIdentity. Please add a NetworkIdentity to " + player);
|
||||
return false;
|
||||
}
|
||||
identity.Reset();
|
||||
@ -637,9 +637,9 @@ internal static bool InternalAddPlayerForConnection(NetworkConnection conn, Game
|
||||
return true;
|
||||
}
|
||||
|
||||
if (LogFilter.Debug) Debug.Log("Adding new playerGameObject object netId: " + playerGameObject.GetComponent<NetworkIdentity>().netId + " asset ID " + playerGameObject.GetComponent<NetworkIdentity>().assetId);
|
||||
if (LogFilter.Debug) Debug.Log("Adding new playerGameObject object netId: " + player.GetComponent<NetworkIdentity>().netId + " asset ID " + player.GetComponent<NetworkIdentity>().assetId);
|
||||
|
||||
FinishPlayerForConnection(conn, identity, playerGameObject);
|
||||
FinishPlayerForConnection(conn, identity, player);
|
||||
if (identity.localPlayerAuthority)
|
||||
{
|
||||
identity.SetClientOwner(conn);
|
||||
|
Loading…
Reference in New Issue
Block a user