mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
NetworkServer.SendToAll/SendToObservers: remove LocalConnectionToClient check because they both use Send now
This commit is contained in:
parent
3896722a49
commit
a8db766837
@ -258,7 +258,6 @@ public static void ActivateHostScene()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// this is like SendToReady - but it doesn't check the ready flag on the connection.
|
||||
/// this is used for ObjectDestroy messages.
|
||||
@ -283,11 +282,6 @@ static void SendToObservers<T>(NetworkIdentity identity, T msg, int channelId =
|
||||
|
||||
foreach (NetworkConnection conn in identity.observers.Values)
|
||||
{
|
||||
// use local connection directly because it doesn't send via transport
|
||||
if (conn is LocalConnectionToClient)
|
||||
conn.Send(segment);
|
||||
// send to regular connection
|
||||
else
|
||||
conn.Send(segment, channelId);
|
||||
}
|
||||
|
||||
@ -330,12 +324,6 @@ public static void SendToAll<T>(T msg, int channelId = Channels.DefaultReliable,
|
||||
continue;
|
||||
|
||||
count++;
|
||||
|
||||
// use local connection directly because it doesn't send via transport
|
||||
if (conn is LocalConnectionToClient)
|
||||
conn.Send(segment);
|
||||
// send to regular connection
|
||||
else
|
||||
conn.Send(segment, channelId);
|
||||
}
|
||||
|
||||
@ -392,12 +380,6 @@ public static void SendToReady<T>(NetworkIdentity identity, T msg, bool includeO
|
||||
if ((!isOwner || includeOwner) && conn.isReady)
|
||||
{
|
||||
count++;
|
||||
|
||||
// use local connection directly because it doesn't send via transport
|
||||
if (conn is LocalConnectionToClient)
|
||||
conn.Send(segment);
|
||||
// send to connection
|
||||
else
|
||||
conn.Send(segment, channelId);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user