mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
more sorting
This commit is contained in:
parent
5a23cd056e
commit
e4729c2608
@ -220,6 +220,15 @@ internal static void RemoveLocalConnection()
|
||||
RemoveConnection(0);
|
||||
}
|
||||
|
||||
/// <summary>True if we have no external connections (host is allowed)</summary>
|
||||
public static bool NoExternalConnections()
|
||||
{
|
||||
return connections.Count == 0 ||
|
||||
(connections.Count == 1 && localConnection != null);
|
||||
}
|
||||
[Obsolete("NoConnections was renamed to NoExternalConnections because that's what it checks for.")]
|
||||
public static bool NoConnections() => NoExternalConnections();
|
||||
|
||||
// send ////////////////////////////////////////////////////////////////
|
||||
/// <summary>Send a message to all clients, even those that haven't joined the world yet (non ready)</summary>
|
||||
public static void SendToAll<T>(T message, int channelId = Channels.DefaultReliable, bool sendToReadyOnly = false)
|
||||
@ -524,15 +533,6 @@ public static void DisconnectAllConnections()
|
||||
connections.Clear();
|
||||
}
|
||||
|
||||
/// <summary>True if we have no external connections (host is allowed)</summary>
|
||||
public static bool NoExternalConnections()
|
||||
{
|
||||
return connections.Count == 0 ||
|
||||
(connections.Count == 1 && localConnection != null);
|
||||
}
|
||||
[Obsolete("NoConnections was renamed to NoExternalConnections because that's what it checks for.")]
|
||||
public static bool NoConnections() => NoExternalConnections();
|
||||
|
||||
// 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
|
||||
|
Loading…
Reference in New Issue
Block a user