From 9d7c9069d792183a7d3a1573c12caeea48fb30a0 Mon Sep 17 00:00:00 2001 From: Paul Pacheco Date: Tue, 22 Sep 2020 08:17:06 -0500 Subject: [PATCH] Simplify namespace --- .../Editor/Weaver/Processors/SyncVarProcessor.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Assets/Mirror/Editor/Weaver/Processors/SyncVarProcessor.cs b/Assets/Mirror/Editor/Weaver/Processors/SyncVarProcessor.cs index 87621136e..a3f02f808 100644 --- a/Assets/Mirror/Editor/Weaver/Processors/SyncVarProcessor.cs +++ b/Assets/Mirror/Editor/Weaver/Processors/SyncVarProcessor.cs @@ -20,7 +20,7 @@ static string HookParameterMessage(string hookName, TypeReference ValueType) // Get hook method if any public static MethodDefinition GetHookMethod(TypeDefinition td, FieldDefinition syncVar) { - CustomAttribute syncVarAttr = syncVar.GetCustomAttribute(); + CustomAttribute syncVarAttr = syncVar.GetCustomAttribute(); if (syncVarAttr == null) return null; @@ -95,7 +95,7 @@ public static MethodDefinition ProcessSyncVarGet(FieldDefinition fd, string orig worker.Append(worker.Create(OpCodes.Ret)); } // [SyncVar] NetworkIdentity? - else if (fd.FieldType.Is()) + else if (fd.FieldType.Is()) { // return this.GetSyncVarNetworkIdentity(ref field, uint netId); // this. @@ -149,7 +149,7 @@ public static MethodDefinition ProcessSyncVarSet(TypeDefinition td, FieldDefinit worker.Append(worker.Create(OpCodes.Call, WeaverTypes.syncVarGameObjectEqualReference)); } - else if (fd.FieldType.Is()) + else if (fd.FieldType.Is()) { // reference to netId Field to set worker.Append(worker.Create(OpCodes.Ldarg_0)); @@ -199,7 +199,7 @@ public static MethodDefinition ProcessSyncVarSet(TypeDefinition td, FieldDefinit worker.Append(worker.Create(OpCodes.Call, WeaverTypes.setSyncVarGameObjectReference)); } - else if (fd.FieldType.Is()) + else if (fd.FieldType.Is()) { // reference to netId Field to set worker.Append(worker.Create(OpCodes.Ldarg_0)); @@ -267,7 +267,7 @@ public static void ProcessSyncVar(TypeDefinition td, FieldDefinition fd, Diction // GameObject/NetworkIdentity SyncVars have a new field for netId FieldDefinition netIdField = null; if (fd.FieldType.Is() || - fd.FieldType.Is()) + fd.FieldType.Is()) { netIdField = new FieldDefinition("___" + fd.Name + "NetId", FieldAttributes.Private, @@ -298,7 +298,7 @@ public static void ProcessSyncVar(TypeDefinition td, FieldDefinition fd, Diction // -> only for GameObjects, otherwise an int syncvar's getter would // end up in recursion. if (fd.FieldType.Is() || - fd.FieldType.Is()) + fd.FieldType.Is()) { Weaver.WeaveLists.replacementGetterProperties[fd] = get; } @@ -316,7 +316,7 @@ public static (List syncVars, Dictionary()) + if (fd.HasCustomAttribute()) { if ((fd.Attributes & FieldAttributes.Static) != 0) {