mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
removing code that isnt needed (#2090)
we use the original method name so we do not need to remove the prefix
This commit is contained in:
parent
ef47ee7a57
commit
f1698e658c
@ -41,12 +41,6 @@ public static MethodDefinition ProcessCommandCall(TypeDefinition td, MethodDefin
|
||||
|
||||
NetworkBehaviourProcessor.WriteSetupLocals(worker);
|
||||
|
||||
if (Weaver.GenerateLogErrors)
|
||||
{
|
||||
worker.Append(worker.Create(OpCodes.Ldstr, "Call Command function " + md.Name));
|
||||
worker.Append(worker.Create(OpCodes.Call, Weaver.logErrorReference));
|
||||
}
|
||||
|
||||
// NetworkWriter writer = new NetworkWriter();
|
||||
NetworkBehaviourProcessor.WriteCreateWriter(worker);
|
||||
|
||||
@ -55,12 +49,6 @@ public static MethodDefinition ProcessCommandCall(TypeDefinition td, MethodDefin
|
||||
return null;
|
||||
|
||||
string cmdName = md.Name;
|
||||
int index = cmdName.IndexOf(CmdPrefix);
|
||||
if (index > -1)
|
||||
{
|
||||
cmdName = cmdName.Substring(CmdPrefix.Length);
|
||||
}
|
||||
|
||||
int channel = commandAttr.GetField("channel", 0);
|
||||
bool ignoreAuthority = commandAttr.GetField("ignoreAuthority", false);
|
||||
|
||||
|
@ -81,12 +81,6 @@ public static MethodDefinition ProcessRpcCall(TypeDefinition td, MethodDefinitio
|
||||
return null;
|
||||
|
||||
string rpcName = md.Name;
|
||||
int index = rpcName.IndexOf(RpcPrefix);
|
||||
if (index > -1)
|
||||
{
|
||||
rpcName = rpcName.Substring(RpcPrefix.Length);
|
||||
}
|
||||
|
||||
int channel = clientRpcAttr.GetField("channel", 0);
|
||||
bool excludeOwner = clientRpcAttr.GetField("excludeOwner", false);
|
||||
|
||||
|
@ -103,11 +103,6 @@ public static MethodDefinition ProcessTargetRpcCall(TypeDefinition td, MethodDef
|
||||
return null;
|
||||
|
||||
string rpcName = md.Name;
|
||||
int index = rpcName.IndexOf(TargetRpcPrefix);
|
||||
if (index > -1)
|
||||
{
|
||||
rpcName = rpcName.Substring(TargetRpcPrefix.Length);
|
||||
}
|
||||
|
||||
// invoke SendInternal and return
|
||||
// this
|
||||
|
Loading…
Reference in New Issue
Block a user