mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
NetworkClient.HandleClientDisconnect: remove unnecessary connection parameter. it wasn't even used.
This commit is contained in:
parent
4a47b1c7d2
commit
d7ee25e589
@ -109,7 +109,7 @@ internal void DisconnectInternal()
|
||||
// set not ready and handle clientscene disconnect in any case
|
||||
// (might be client or host mode here)
|
||||
isReady = false;
|
||||
NetworkClient.HandleClientDisconnect(this);
|
||||
NetworkClient.HandleClientDisconnect();
|
||||
}
|
||||
|
||||
/// <summary>Disconnects this connection.</summary>
|
||||
|
@ -203,7 +203,7 @@ public static void ConnectLocalServer()
|
||||
public static void Disconnect()
|
||||
{
|
||||
connectState = ConnectState.Disconnected;
|
||||
HandleClientDisconnect(connection);
|
||||
HandleClientDisconnect();
|
||||
|
||||
// local or remote connection?
|
||||
if (isLocalClient)
|
||||
@ -277,7 +277,7 @@ static void OnDisconnected()
|
||||
{
|
||||
connectState = ConnectState.Disconnected;
|
||||
|
||||
HandleClientDisconnect(connection);
|
||||
HandleClientDisconnect();
|
||||
|
||||
if (connection != null) OnDisconnectedEvent?.Invoke(connection);
|
||||
}
|
||||
@ -792,7 +792,9 @@ public static bool Ready()
|
||||
[Obsolete("NetworkClient.Ready doesn't need a NetworkConnection parameter anymore. It always uses NetworkClient.connection anyway.")]
|
||||
public static bool Ready(NetworkConnection conn) => Ready();
|
||||
|
||||
internal static void HandleClientDisconnect(NetworkConnection conn)
|
||||
// TODO just set ready=false directly. the name doesn't imply what this
|
||||
// function does.
|
||||
internal static void HandleClientDisconnect()
|
||||
{
|
||||
ready = false;
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ public override void Disconnect()
|
||||
// set not ready and handle clientscene disconnect in any case
|
||||
// (might be client or host mode here)
|
||||
isReady = false;
|
||||
NetworkClient.HandleClientDisconnect(this);
|
||||
NetworkClient.HandleClientDisconnect();
|
||||
Transport.activeTransport.ClientDisconnect();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user