From fe9b24791585da704efc03c5eeb162bb4fad098e Mon Sep 17 00:00:00 2001 From: kmyuhkyuk <2451614940@qq.com> Date: Wed, 17 Aug 2022 10:11:39 +0800 Subject: [PATCH] Update --- SkinHide/Patches/BotOwnerPatch.cs | 21 --------------------- SkinHide/Patches/PlayerPatch.cs | 4 ++++ SkinHide/SkinHide.csproj | 1 - SkinHide/SkinHidePlugin.cs | 1 - 4 files changed, 4 insertions(+), 23 deletions(-) delete mode 100644 SkinHide/Patches/BotOwnerPatch.cs diff --git a/SkinHide/Patches/BotOwnerPatch.cs b/SkinHide/Patches/BotOwnerPatch.cs deleted file mode 100644 index 95b0bf2..0000000 --- a/SkinHide/Patches/BotOwnerPatch.cs +++ /dev/null @@ -1,21 +0,0 @@ -using Aki.Reflection.Patching; -using Aki.Reflection.Utils; -using System.Reflection; -using EFT; - -namespace SkinHide.Patches -{ - public class BotOwnerPatch : ModulePatch - { - protected override MethodBase GetTargetMethod() - { - return typeof(BotOwner).GetMethod("method_4", PatchConstants.PrivateFlags); - } - - [PatchPostfix] - private static void PatchPostfix(BotOwner __instance) - { - SkinHidePlugin.Bot.Add(__instance.gameObject.GetComponentInChildren()); - } - } -} diff --git a/SkinHide/Patches/PlayerPatch.cs b/SkinHide/Patches/PlayerPatch.cs index 7a2da40..2e6e097 100644 --- a/SkinHide/Patches/PlayerPatch.cs +++ b/SkinHide/Patches/PlayerPatch.cs @@ -22,6 +22,10 @@ namespace SkinHide.Patches { SkinHidePlugin.Player = __instance.gameObject.GetComponentInChildren(); } + else + { + SkinHidePlugin.Bot.Add(__instance.gameObject.GetComponentInChildren()); + } } } } diff --git a/SkinHide/SkinHide.csproj b/SkinHide/SkinHide.csproj index 9a367bf..1080834 100644 --- a/SkinHide/SkinHide.csproj +++ b/SkinHide/SkinHide.csproj @@ -74,7 +74,6 @@ - diff --git a/SkinHide/SkinHidePlugin.cs b/SkinHide/SkinHidePlugin.cs index 9d7e567..0bddfe9 100644 --- a/SkinHide/SkinHidePlugin.cs +++ b/SkinHide/SkinHidePlugin.cs @@ -54,7 +54,6 @@ namespace SkinHide new PlayerModelViewPatch().Enable(); new PlayerPatch().Enable(); - new BotOwnerPatch().Enable(); } void Update()