NetworkServer.InternalAddPlayerForConnection: rename playerGameObject parameter for consistency

This commit is contained in:
vis2k 2019-03-22 10:02:30 +01:00
parent 75e51513db
commit 4f53f37dc8

View File

@ -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);