mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
Rename GenerateCommandDelegate to GenerateRegisterCommandDelegate because that's what it does
This commit is contained in:
parent
91e13ce87a
commit
8659b2a989
@ -246,22 +246,22 @@ void GenerateConstants()
|
|||||||
|
|
||||||
for (int i = 0; i < m_Cmds.Count; ++i)
|
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)
|
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)
|
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)
|
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)
|
foreach (FieldDefinition fd in m_SyncObjects)
|
||||||
@ -314,7 +314,7 @@ void GenerateSyncListInstanceInitializer(ILProcessor ctorWorker, FieldDefinition
|
|||||||
// This generates code like:
|
// This generates code like:
|
||||||
NetworkBehaviour.RegisterCommandDelegate(base.GetType(), "CmdThrust", new NetworkBehaviour.CmdDelegate(ShipControl.InvokeCmdCmdThrust));
|
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.Ldtoken, m_td));
|
||||||
awakeWorker.Append(awakeWorker.Create(OpCodes.Call, Weaver.getTypeFromHandleReference));
|
awakeWorker.Append(awakeWorker.Create(OpCodes.Call, Weaver.getTypeFromHandleReference));
|
||||||
|
Loading…
Reference in New Issue
Block a user