DisconnectAllConnections was renamed to DisconnectAllExternalConnections because that's what it does.

This commit is contained in:
vis2k 2021-03-07 15:29:20 +08:00
parent 207501de4e
commit f54f9c3599
2 changed files with 6 additions and 3 deletions

View File

@ -504,13 +504,13 @@ internal static bool GetNetworkIdentity(GameObject go, out NetworkIdentity ident
/// <summary>Disconnect all connections, including the local connection.</summary>
public static void DisconnectAll()
{
DisconnectAllConnections();
DisconnectAllExternalConnections();
localConnection = null;
active = false;
}
/// <summary>Disconnect all currently connected clients except the local connection.</summary>
public static void DisconnectAllConnections()
public static void DisconnectAllExternalConnections()
{
// disconnect and remove all connections.
// we can not use foreach here because if
@ -533,6 +533,9 @@ public static void DisconnectAllConnections()
connections.Clear();
}
[Obsolete("DisconnectAllConnections was renamed to DisconnectAllExternalConnections because that's what it does.")]
public static void DisconnectAllConnections() => DisconnectAllExternalConnections();
// add/remove/replace player ///////////////////////////////////////////
/// <summary>Called by server after AddPlayer message to add the player for the connection.</summary>
// When a player is added for a connection, the client for that

View File

@ -364,7 +364,7 @@ public void DisconnectAllConnectionsTest()
Assert.That(NetworkServer.connections.Count, Is.EqualTo(1));
// disconnect all connections
NetworkServer.DisconnectAllConnections();
NetworkServer.DisconnectAllExternalConnections();
Assert.That(NetworkServer.connections.Count, Is.EqualTo(0));
}