From a4e6163f9ffe88ec7874cbef8879212927322d46 Mon Sep 17 00:00:00 2001 From: vis2k Date: Tue, 18 Jan 2022 15:51:16 +0800 Subject: [PATCH] syntax & comments --- Assets/Mirror/Runtime/RemoteCalls.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Assets/Mirror/Runtime/RemoteCalls.cs b/Assets/Mirror/Runtime/RemoteCalls.cs index ce248487b..c9421566b 100644 --- a/Assets/Mirror/Runtime/RemoteCalls.cs +++ b/Assets/Mirror/Runtime/RemoteCalls.cs @@ -106,12 +106,13 @@ static bool GetInvokerForHash(int cmdHash, RemoteCallType remoteCallType, out In invoker.remoteCallType == remoteCallType; // InvokeCmd/Rpc Delegate can all use the same function here - internal static bool InvokeHandlerDelegate(int cmdHash, RemoteCallType remoteCallType, NetworkReader reader, NetworkBehaviour invokingType, NetworkConnectionToClient senderConnection = null) + internal static bool InvokeHandlerDelegate(int cmdHash, RemoteCallType remoteCallType, NetworkReader reader, NetworkBehaviour component, NetworkConnectionToClient senderConnection = null) { if (GetInvokerForHash(cmdHash, remoteCallType, out Invoker invoker) && - invoker.invokeClass.IsInstanceOfType(invokingType)) + invoker.invokeClass.IsInstanceOfType(component)) { - invoker.invokeFunction(invokingType, reader, senderConnection); + // invoke function on this component + invoker.invokeFunction(component, reader, senderConnection); return true; } return false;