diff --git a/SkinHide/Patches/PlayerPatch.cs b/SkinHide/Patches/PlayerPatch.cs index 7d29f76..a6af473 100644 --- a/SkinHide/Patches/PlayerPatch.cs +++ b/SkinHide/Patches/PlayerPatch.cs @@ -9,7 +9,12 @@ namespace SkinHide.Patches { public class PlayerPatch : ModulePatch { - private static bool? Is231Up; + private static bool Is231Up; + + static PlayerPatch() + { + Is231Up = typeof(Player).GetProperty("IsYourPlayer").GetSetMethod() == null; + } protected override MethodBase GetTargetMethod() { @@ -21,11 +26,6 @@ namespace SkinHide.Patches { await __result; - if (!Is231Up.HasValue) - { - Is231Up = typeof(Player).GetProperty("IsYourPlayer").GetSetMethod() == null; - } - bool isYouPlayer; if ((bool)Is231Up)