NetworkBehaviour.InvokeCommand/Rpc/SyncEventDelegate wrapper functions removed.

This commit is contained in:
vis2k 2018-12-30 18:35:32 +01:00
parent 24b700b266
commit e573acd33e

View File

@ -104,7 +104,7 @@ protected void SendCommandInternal(string cmdName, NetworkWriter writer, int cha
[EditorBrowsable(EditorBrowsableState.Never)] [EditorBrowsable(EditorBrowsableState.Never)]
public virtual bool InvokeCommand(int cmdHash, NetworkReader reader) public virtual bool InvokeCommand(int cmdHash, NetworkReader reader)
{ {
return InvokeCommandDelegate(cmdHash, reader); return InvokeHandlerDelegateOfType(cmdHash, UNetInvokeType.Command, reader);
} }
// ----------------------------- Client RPCs -------------------------------- // ----------------------------- Client RPCs --------------------------------
@ -150,9 +150,9 @@ protected void SendTargetRPCInternal(NetworkConnection conn, string rpcName, Net
} }
[EditorBrowsable(EditorBrowsableState.Never)] [EditorBrowsable(EditorBrowsableState.Never)]
public virtual bool InvokeRPC(int cmdHash, NetworkReader reader) public virtual bool InvokeRPC(int rpcHash, NetworkReader reader)
{ {
return InvokeRpcDelegate(cmdHash, reader); return InvokeHandlerDelegateOfType(rpcHash, UNetInvokeType.ClientRpc, reader);
} }
// ----------------------------- Sync Events -------------------------------- // ----------------------------- Sync Events --------------------------------
@ -177,9 +177,9 @@ protected void SendEventInternal(string eventName, NetworkWriter writer, int cha
} }
[EditorBrowsable(EditorBrowsableState.Never)] [EditorBrowsable(EditorBrowsableState.Never)]
public virtual bool InvokeSyncEvent(int cmdHash, NetworkReader reader) public virtual bool InvokeSyncEvent(int eventHash, NetworkReader reader)
{ {
return InvokeSyncEventDelegate(cmdHash, reader); return InvokeHandlerDelegateOfType(eventHash, UNetInvokeType.SyncEvent, reader);
} }
// ----------------------------- Code Gen Path Helpers -------------------------------- // ----------------------------- Code Gen Path Helpers --------------------------------
@ -271,21 +271,6 @@ internal bool InvokeHandlerDelegateOfType(int cmdHash, UNetInvokeType invokeType
return false; return false;
} }
internal bool InvokeCommandDelegate(int cmdHash, NetworkReader reader)
{
return InvokeHandlerDelegateOfType(cmdHash, UNetInvokeType.Command, reader);
}
internal bool InvokeRpcDelegate(int cmdHash, NetworkReader reader)
{
return InvokeHandlerDelegateOfType(cmdHash, UNetInvokeType.ClientRpc, reader);
}
internal bool InvokeSyncEventDelegate(int cmdHash, NetworkReader reader)
{
return InvokeHandlerDelegateOfType(cmdHash, UNetInvokeType.SyncEvent, reader);
}
internal static string GetCmdHashHandlerName(int cmdHash) internal static string GetCmdHashHandlerName(int cmdHash)
{ {
if (!s_CmdHandlerDelegates.ContainsKey(cmdHash)) if (!s_CmdHandlerDelegates.ContainsKey(cmdHash))