mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
Rename includeSelf to includeOwner (#1163)
* Rename includeSelf to includeOwner * Renamed isSelf too
This commit is contained in:
parent
11b3cce123
commit
ae5c92b40c
@ -356,10 +356,10 @@ public static bool SendToReady(NetworkIdentity identity, short msgType, MessageB
|
||||
/// <typeparam name="T">Message type.</typeparam>
|
||||
/// <param name="identity"></param>
|
||||
/// <param name="msg">Message structure.</param>
|
||||
/// <param name="includeSelf">Send to observers including self..</param>
|
||||
/// <param name="includeOwner">Send to observers including self..</param>
|
||||
/// <param name="channelId">Transport channel to use</param>
|
||||
/// <returns></returns>
|
||||
public static bool SendToReady<T>(NetworkIdentity identity, T msg, bool includeSelf = true, int channelId = Channels.DefaultReliable) where T : IMessageBase
|
||||
public static bool SendToReady<T>(NetworkIdentity identity, T msg, bool includeOwner = true, int channelId = Channels.DefaultReliable) where T : IMessageBase
|
||||
{
|
||||
if (LogFilter.Debug) Debug.Log("Server.SendToReady msgType:" + typeof(T));
|
||||
|
||||
@ -380,9 +380,8 @@ public static bool SendToReady<T>(NetworkIdentity identity, T msg, bool includeS
|
||||
int count = 0;
|
||||
foreach (KeyValuePair<int, NetworkConnection> kvp in identity.observers)
|
||||
{
|
||||
bool isSelf = kvp.Value == identity.connectionToClient;
|
||||
if ((!isSelf || includeSelf) &&
|
||||
kvp.Value.isReady)
|
||||
bool isOwner = kvp.Value == identity.connectionToClient;
|
||||
if ((!isOwner || includeOwner) && kvp.Value.isReady)
|
||||
{
|
||||
count++;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user