Remove unused, obsolete private method

This commit is contained in:
Paul Pacheco 2019-10-14 07:20:47 -05:00
parent ec5434b087
commit 85faddfdd0

View File

@ -215,29 +215,6 @@ internal static void ActivateLocalClientScene()
}
}
// this is like SendToReady - but it doesn't check the ready flag on the connection.
// this is used for ObjectDestroy messages.
[EditorBrowsable(EditorBrowsableState.Never), Obsolete("use SendToObservers<T> instead")]
static bool SendToObservers(NetworkIdentity identity, short msgType, MessageBase msg)
{
if (LogFilter.Debug) Debug.Log("Server.SendToObservers id:" + msgType);
if (identity != null && identity.observers != null)
{
// pack message into byte[] once
byte[] bytes = MessagePacker.PackMessage((ushort)msgType, msg);
// send to all observers
bool result = true;
foreach (KeyValuePair<int, NetworkConnection> kvp in identity.observers)
{
result &= kvp.Value.Send(new ArraySegment<byte>(bytes));
}
return result;
}
return false;
}
// this is like SendToReady - but it doesn't check the ready flag on the connection.
// this is used for ObjectDestroy messages.
static bool SendToObservers<T>(NetworkIdentity identity, T msg) where T: IMessageBase