Rename includeSelf to includeOwner (#1163)

* Rename includeSelf to includeOwner

* Renamed isSelf too
This commit is contained in:
MrGadget 2019-10-19 03:47:17 -04:00 committed by vis2k
parent 11b3cce123
commit ae5c92b40c

View File

@ -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++;