mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
Make Weaver variable naming consistent (#781)
* Rename netViewTmp * Rename UBehaviourIsServer * Better name for IsServer
This commit is contained in:
parent
98d6e667b0
commit
68433660ca
@ -50,7 +50,7 @@ public static MethodDefinition ProcessCommandCall(TypeDefinition td, MethodDefin
|
||||
// local client check
|
||||
Instruction localClientLabel = cmdWorker.Create(OpCodes.Nop);
|
||||
cmdWorker.Append(cmdWorker.Create(OpCodes.Ldarg_0));
|
||||
cmdWorker.Append(cmdWorker.Create(OpCodes.Call, Weaver.UBehaviourIsServer));
|
||||
cmdWorker.Append(cmdWorker.Create(OpCodes.Call, Weaver.getBehaviourIsServer));
|
||||
cmdWorker.Append(cmdWorker.Create(OpCodes.Brfalse, localClientLabel));
|
||||
|
||||
// call the cmd function directly.
|
||||
|
@ -91,7 +91,7 @@ class Weaver
|
||||
public static MethodReference NetworkServerGetActive;
|
||||
public static MethodReference NetworkServerGetLocalClientActive;
|
||||
public static MethodReference NetworkClientGetActive;
|
||||
public static MethodReference UBehaviourIsServer;
|
||||
public static MethodReference getBehaviourIsServer;
|
||||
public static MethodReference NetworkReaderReadPackedUInt32;
|
||||
public static MethodReference NetworkReaderReadPackedUInt64;
|
||||
public static MethodReference NetworkWriterWritePackedUInt64;
|
||||
@ -325,8 +325,8 @@ static void SetupTargetTypes()
|
||||
CurrentAssembly.MainModule.ImportReference(gameObjectType);
|
||||
CurrentAssembly.MainModule.ImportReference(transformType);
|
||||
|
||||
TypeReference netViewTmp = NetAssembly.MainModule.GetType("Mirror.NetworkIdentity");
|
||||
NetworkIdentityType = CurrentAssembly.MainModule.ImportReference(netViewTmp);
|
||||
TypeReference networkIdentityTmp = NetAssembly.MainModule.GetType("Mirror.NetworkIdentity");
|
||||
NetworkIdentityType = CurrentAssembly.MainModule.ImportReference(networkIdentityTmp);
|
||||
|
||||
NetworkBehaviourType = NetAssembly.MainModule.GetType("Mirror.NetworkBehaviour");
|
||||
NetworkBehaviourType2 = CurrentAssembly.MainModule.ImportReference(NetworkBehaviourType);
|
||||
@ -352,11 +352,11 @@ static void SetupTargetTypes()
|
||||
// get specialized GetComponent<NetworkIdentity>()
|
||||
getComponentReference = Resolvers.ResolveMethodGeneric(ComponentType, CurrentAssembly, "GetComponent", NetworkIdentityType);
|
||||
|
||||
getNetIdReference = Resolvers.ResolveMethod(netViewTmp, CurrentAssembly, "get_netId");
|
||||
getNetIdReference = Resolvers.ResolveMethod(networkIdentityTmp, CurrentAssembly, "get_netId");
|
||||
|
||||
gameObjectInequality = Resolvers.ResolveMethod(unityObjectType, CurrentAssembly, "op_Inequality");
|
||||
|
||||
UBehaviourIsServer = Resolvers.ResolveMethod(NetworkBehaviourType, CurrentAssembly, "get_isServer");
|
||||
getBehaviourIsServer = Resolvers.ResolveMethod(NetworkBehaviourType, CurrentAssembly, "get_isServer");
|
||||
setSyncVarReference = Resolvers.ResolveMethod(NetworkBehaviourType, CurrentAssembly, "SetSyncVar");
|
||||
setSyncVarHookGuard = Resolvers.ResolveMethod(NetworkBehaviourType, CurrentAssembly, "set_syncVarHookGuard");
|
||||
getSyncVarHookGuard = Resolvers.ResolveMethod(NetworkBehaviourType, CurrentAssembly, "get_syncVarHookGuard");
|
||||
|
Loading…
Reference in New Issue
Block a user