NetworkServer.DisconnectAllConnections: simplify code

This commit is contained in:
vis2k 2019-04-05 21:53:24 +02:00
parent a574b181bb
commit a3e9fbb5bd

View File

@ -293,9 +293,8 @@ public static void DisconnectAll()
public static void DisconnectAllConnections()
{
foreach (KeyValuePair<int, NetworkConnection> kvp in connections)
foreach (NetworkConnection conn in connections.Values)
{
NetworkConnection conn = kvp.Value;
conn.Disconnect();
// call OnDisconnected unless local player in host mode
if (conn.connectionId != 0)