refactor: we no longer replace methods

This commit is contained in:
Paul Pacheco 2019-09-30 21:23:44 -05:00
parent 5ecd646134
commit fb15c56d39
2 changed files with 0 additions and 15 deletions

View File

@ -286,18 +286,6 @@ static void ProcessInstructionMethod(MethodDefinition md, Instruction instr, Met
}
}
}
else
{
// should it be replaced?
// NOTE: original weaver compared .FullName, not just the MethodDefinition,
// that's why we use dict<string,method>.
if (Weaver.WeaveLists.replaceMethods.TryGetValue(opMethodRef.FullName, out MethodDefinition replacement))
{
//DLog(td, " replacing " + md.Name + ":" + i);
instr.Operand = replacement;
//DLog(td, " replaced " + md.Name + ":" + i);
}
}
}

View File

@ -15,9 +15,6 @@ class WeaverLists
// getter functions that replace [SyncVar] member variable references. dict<field, replacement>
public Dictionary<FieldDefinition, MethodDefinition> replacementGetterProperties = new Dictionary<FieldDefinition, MethodDefinition>();
// [Command]/[ClientRpc] functions that should be replaced. dict<originalMethodFullName, replacement>
public Dictionary<string, MethodDefinition> replaceMethods = new Dictionary<string, MethodDefinition>();
// [SyncEvent] invoke functions that should be replaced. dict<originalEventName, replacement>
public Dictionary<string, MethodDefinition> replaceEvents = new Dictionary<string, MethodDefinition>();