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:
James Frowen 2020-07-13 10:44:51 +01:00 committed by GitHub
parent ef47ee7a57
commit f1698e658c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 0 additions and 23 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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