diff --git a/Mirror/Weaver/Processors/NetworkBehaviourProcessor.cs b/Mirror/Weaver/Processors/NetworkBehaviourProcessor.cs index 87ef5960f..edf49788e 100644 --- a/Mirror/Weaver/Processors/NetworkBehaviourProcessor.cs +++ b/Mirror/Weaver/Processors/NetworkBehaviourProcessor.cs @@ -246,22 +246,22 @@ void GenerateConstants() for (int i = 0; i < m_Cmds.Count; ++i) { - GenerateCommandDelegate(cctorWorker, Weaver.registerCommandDelegateReference, m_CmdInvocationFuncs[i], m_Cmds[i].Name); + GenerateRegisterCommandDelegate(cctorWorker, Weaver.registerCommandDelegateReference, m_CmdInvocationFuncs[i], m_Cmds[i].Name); } for (int i = 0; i < m_Rpcs.Count; ++i) { - GenerateCommandDelegate(cctorWorker, Weaver.registerRpcDelegateReference, m_RpcInvocationFuncs[i], m_Rpcs[i].Name); + GenerateRegisterCommandDelegate(cctorWorker, Weaver.registerRpcDelegateReference, m_RpcInvocationFuncs[i], m_Rpcs[i].Name); } for (int i = 0; i < m_TargetRpcs.Count; ++i) { - GenerateCommandDelegate(cctorWorker, Weaver.registerRpcDelegateReference, m_TargetRpcInvocationFuncs[i], m_TargetRpcs[i].Name); + GenerateRegisterCommandDelegate(cctorWorker, Weaver.registerRpcDelegateReference, m_TargetRpcInvocationFuncs[i], m_TargetRpcs[i].Name); } for (int i = 0; i < m_Events.Count; ++i) { - GenerateCommandDelegate(cctorWorker, Weaver.registerEventDelegateReference, m_EventInvocationFuncs[i], m_Events[i].Name); + GenerateRegisterCommandDelegate(cctorWorker, Weaver.registerEventDelegateReference, m_EventInvocationFuncs[i], m_Events[i].Name); } foreach (FieldDefinition fd in m_SyncObjects) @@ -314,7 +314,7 @@ void GenerateSyncListInstanceInitializer(ILProcessor ctorWorker, FieldDefinition // This generates code like: NetworkBehaviour.RegisterCommandDelegate(base.GetType(), "CmdThrust", new NetworkBehaviour.CmdDelegate(ShipControl.InvokeCmdCmdThrust)); */ - void GenerateCommandDelegate(ILProcessor awakeWorker, MethodReference registerMethod, MethodDefinition func, string cmdName) + void GenerateRegisterCommandDelegate(ILProcessor awakeWorker, MethodReference registerMethod, MethodDefinition func, string cmdName) { awakeWorker.Append(awakeWorker.Create(OpCodes.Ldtoken, m_td)); awakeWorker.Append(awakeWorker.Create(OpCodes.Call, Weaver.getTypeFromHandleReference));