From 87b4bef91f3ed8c877719fad267fed0204da00f7 Mon Sep 17 00:00:00 2001 From: kmyuhkyuk <2451614940@qq.com> Date: Mon, 7 Nov 2022 10:17:07 +0800 Subject: [PATCH] Update --- SkinHide/Patches/PlayerPatch.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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)