add comments

This commit is contained in:
vis2k 2021-05-10 20:57:38 +08:00
parent 497c279b2f
commit e723a52c97

View File

@ -1196,6 +1196,9 @@ public virtual void OnServerConnect(NetworkConnection conn) {}
// Called by NetworkServer.OnTransportDisconnect!
public virtual void OnServerDisconnect(NetworkConnection conn)
{
// by default, this function destroys the connection's player.
// can be overwritten for cases like delayed logouts in MMOs to
// avoid players escaping from PvP situations by logging out.
NetworkServer.DestroyPlayerForConnection(conn);
Debug.Log("OnServerDisconnect: Client disconnected.");
}