From 8f5c6c7b93da0a9bcd7323eb764cd2f426a7ce15 Mon Sep 17 00:00:00 2001 From: vis2k Date: Sun, 7 Mar 2021 14:37:59 +0800 Subject: [PATCH] cleanup --- Assets/Mirror/Runtime/NetworkServer.cs | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/Assets/Mirror/Runtime/NetworkServer.cs b/Assets/Mirror/Runtime/NetworkServer.cs index 51d22a053..6b7432c9d 100644 --- a/Assets/Mirror/Runtime/NetworkServer.cs +++ b/Assets/Mirror/Runtime/NetworkServer.cs @@ -701,15 +701,9 @@ public static void SendToClientOfPlayer(NetworkIdentity identity, T msg, int } } - /// - /// This replaces the player object for a connection with a different player object. The old player object is not destroyed. - /// If a connection already has a player object, this can be used to replace that object with a different player object. This does NOT change the ready state of the connection, so it can safely be used while changing scenes. - /// - /// Connection which is adding the player. - /// Player object spawned for the player. - /// - /// Does the previous player remain attached to this connection? - /// True if connection was successfully replaced for player. + /// Replaces connection's player object. The old object is not destroyed. + // 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, Guid assetId, bool keepAuthority = false) { if (GetNetworkIdentity(player, out NetworkIdentity identity)) @@ -719,14 +713,9 @@ public static bool ReplacePlayerForConnection(NetworkConnection conn, GameObject return InternalReplacePlayerForConnection(conn, player, keepAuthority); } - /// - /// This replaces the player object for a connection with a different player object. The old player object is not destroyed. - /// If a connection already has a player object, this can be used to replace that object with a different player object. This does NOT change the ready state of the connection, so it can safely be used while changing scenes. - /// - /// Connection which is adding the player. - /// Player object spawned for the player. - /// Does the previous player remain attached to this connection? - /// True if connection was successfully replaced for player. + /// Replaces connection's player object. The old object is not destroyed. + // 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);