mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
refactor: we no longer replace methods
This commit is contained in:
parent
5ecd646134
commit
fb15c56d39
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -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>();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user