diff --git a/Mirror/Weaver/Weaver.cs b/Mirror/Weaver/Weaver.cs index 731eca985..e26e802be 100644 --- a/Mirror/Weaver/Weaver.cs +++ b/Mirror/Weaver/Weaver.cs @@ -227,13 +227,9 @@ public static void DLog(TypeDefinition td, string fmt, params object[] args) public static int GetSyncVarStart(string className) { - if (lists.numSyncVars.ContainsKey(className)) - { - int num = lists.numSyncVars[className]; - return num; - } - // start at zero - return 0; + return lists.numSyncVars.ContainsKey(className) + ? lists.numSyncVars[className] + : 0; } public static void SetNumSyncVars(string className, int num)