diff --git a/Assets/Mirror/Runtime/NetworkConnection.cs b/Assets/Mirror/Runtime/NetworkConnection.cs index 46d099621..9bcd33cad 100644 --- a/Assets/Mirror/Runtime/NetworkConnection.cs +++ b/Assets/Mirror/Runtime/NetworkConnection.cs @@ -31,42 +31,30 @@ public abstract class NetworkConnection /// IP address of the connection. Can be useful for game master IP bans etc. public abstract string address { get; } - /// - /// The last time that a message was received on this connection. - /// This includes internal system messages (such as Commands and ClientRpc calls) and user messages. - /// + /// Last time a message was received for this connection. Includes system & user messages. public float lastMessageTime; - /// - /// The NetworkIdentity for this connection. - /// + /// This connection's main object (usually the player object). public NetworkIdentity identity { get; internal set; } - /// - /// A list of the NetworkIdentity objects owned by this connection. This list is read-only. - /// This includes the player object for the connection - if it has localPlayerAutority set, and any objects spawned with local authority or set with AssignLocalAuthority. - /// This list can be used to validate messages from clients, to ensure that clients are only trying to control objects that they own. - /// - // IMPORTANT: this needs to be , not . fixes a bug where DestroyOwnedObjects wouldn't find - // the netId anymore: https://github.com/vis2k/Mirror/issues/1380 . Works fine with NetworkIdentity pointers though. + /// All NetworkIdentities owned by this connection. Can be main player, pets, etc. + // IMPORTANT: this needs to be , not . + // fixes a bug where DestroyOwnedObjects wouldn't find the + // netId anymore: https://github.com/vis2k/Mirror/issues/1380 + // Works fine with NetworkIdentity pointers though. public readonly HashSet clientOwnedObjects = new HashSet(); - /// - /// Creates a new NetworkConnection - /// internal NetworkConnection() { - // set lastTime to current time when creating connection to make sure it isn't instantly kicked for inactivity + // set lastTime to current time when creating connection to make + // sure it isn't instantly kicked for inactivity lastMessageTime = Time.time; } - /// - /// Creates a new NetworkConnection with the specified connectionId - /// - /// internal NetworkConnection(int networkConnectionId) : this() { connectionId = networkConnectionId; + // TODO why isn't lastMessageTime set in here like in the other ctor? } ///