mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
weaver: don't use ClientScene anymore because it's obsolete
This commit is contained in:
parent
86ae1b0804
commit
968f239345
@ -35,8 +35,8 @@ public static MethodDefinition ProcessTargetRpcInvoke(TypeDefinition td, MethodD
|
||||
if (HasNetworkConnectionParameter(md))
|
||||
{
|
||||
// if call has NetworkConnection write clients connection as first arg
|
||||
//ClientScene.readyconnection
|
||||
worker.Emit(OpCodes.Call, WeaverTypes.ReadyConnectionReference);
|
||||
//NetworkClient.connection
|
||||
worker.Emit(OpCodes.Call, WeaverTypes.NetworkClientConnection);
|
||||
}
|
||||
|
||||
// process reader parameters and skip first one if first one is NetworkConnection
|
||||
|
@ -34,9 +34,6 @@ public static class WeaverTypes
|
||||
public static TypeReference NetworkIdentityType;
|
||||
public static TypeReference IEnumeratorType;
|
||||
|
||||
public static TypeReference ClientSceneType;
|
||||
public static MethodReference ReadyConnectionReference;
|
||||
|
||||
public static TypeReference ComponentType;
|
||||
public static TypeReference ObjectType;
|
||||
|
||||
@ -46,6 +43,7 @@ public static class WeaverTypes
|
||||
public static MethodReference NetworkServerGetActive;
|
||||
public static MethodReference NetworkServerGetLocalClientActive;
|
||||
public static MethodReference NetworkClientGetActive;
|
||||
public static MethodReference NetworkClientConnection;
|
||||
|
||||
// custom attribute types
|
||||
public static TypeReference SyncVarType;
|
||||
@ -176,6 +174,7 @@ public static void SetupTargetTypes(AssemblyDefinition unityAssembly, AssemblyDe
|
||||
NetworkServerGetActive = Resolvers.ResolveMethod(NetworkServerType, currentAssembly, "get_active");
|
||||
NetworkServerGetLocalClientActive = Resolvers.ResolveMethod(NetworkServerType, currentAssembly, "get_localClientActive");
|
||||
NetworkClientGetActive = Resolvers.ResolveMethod(NetworkClientType, currentAssembly, "get_active");
|
||||
NetworkClientConnection = Resolvers.ResolveMethod(NetworkClientType, currentAssembly, "get_connection");
|
||||
|
||||
CmdDelegateReference = mirrorAssembly.MainModule.GetType("Mirror.RemoteCalls.CmdDelegate");
|
||||
CmdDelegateConstructor = Resolvers.ResolveMethod(CmdDelegateReference, currentAssembly, ".ctor");
|
||||
@ -214,8 +213,6 @@ public static void SetupTargetTypes(AssemblyDefinition unityAssembly, AssemblyDe
|
||||
|
||||
ComponentType = unityAssembly.MainModule.GetType("UnityEngine.Component");
|
||||
ObjectType = unityAssembly.MainModule.GetType("UnityEngine.Object");
|
||||
ClientSceneType = mirrorAssembly.MainModule.GetType("Mirror.ClientScene");
|
||||
ReadyConnectionReference = Resolvers.ResolveMethod(ClientSceneType, currentAssembly, "get_readyConnection");
|
||||
|
||||
syncVarEqualReference = Resolvers.ResolveMethod(NetworkBehaviourType, currentAssembly, "SyncVarEqual");
|
||||
syncVarNetworkIdentityEqualReference = Resolvers.ResolveMethod(NetworkBehaviourType, currentAssembly, "SyncVarNetworkIdentityEqual");
|
||||
|
Loading…
Reference in New Issue
Block a user