mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
NetworkServer.InternalReplacePlayerForConnection moved into ReplacePlayerForConnection
This commit is contained in:
parent
330036f1a9
commit
207501de4e
@ -596,7 +596,10 @@ public static bool AddPlayerForConnection(NetworkConnection conn, GameObject pla
|
||||
return AddPlayerForConnection(conn, player);
|
||||
}
|
||||
|
||||
internal static bool InternalReplacePlayerForConnection(NetworkConnection conn, GameObject player, bool keepAuthority)
|
||||
/// <summary>Replaces connection's player object. The old object is not destroyed.</summary>
|
||||
// This does NOT change the ready state of the connection, so it can
|
||||
// safely be used while changing scenes.
|
||||
public static bool ReplacePlayerForConnection(NetworkConnection conn, GameObject player, bool keepAuthority = false)
|
||||
{
|
||||
NetworkIdentity identity = player.GetComponent<NetworkIdentity>();
|
||||
if (identity == null)
|
||||
@ -645,14 +648,6 @@ internal static bool InternalReplacePlayerForConnection(NetworkConnection conn,
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>Replaces connection's player object. The old object is not destroyed.</summary>
|
||||
// This does NOT change the ready state of the connection, so it can
|
||||
// safely be used while changing scenes.
|
||||
public static bool ReplacePlayerForConnection(NetworkConnection conn, GameObject player, bool keepAuthority = false)
|
||||
{
|
||||
return InternalReplacePlayerForConnection(conn, player, keepAuthority);
|
||||
}
|
||||
|
||||
/// <summary>Replaces connection's player object. The old object is not destroyed.</summary>
|
||||
// This does NOT change the ready state of the connection, so it can
|
||||
// safely be used while changing scenes.
|
||||
@ -662,7 +657,7 @@ public static bool ReplacePlayerForConnection(NetworkConnection conn, GameObject
|
||||
{
|
||||
identity.assetId = assetId;
|
||||
}
|
||||
return InternalReplacePlayerForConnection(conn, player, keepAuthority);
|
||||
return ReplacePlayerForConnection(conn, player, keepAuthority);
|
||||
}
|
||||
|
||||
// ready ///////////////////////////////////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user