This commit is contained in:
kmyuhkyuk 2022-08-17 10:11:39 +08:00
parent 4e2ecdb755
commit fe9b247915
4 changed files with 4 additions and 23 deletions

View File

@ -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<PlayerBody>());
}
}
}

View File

@ -22,6 +22,10 @@ namespace SkinHide.Patches
{
SkinHidePlugin.Player = __instance.gameObject.GetComponentInChildren<PlayerBody>();
}
else
{
SkinHidePlugin.Bot.Add(__instance.gameObject.GetComponentInChildren<PlayerBody>());
}
}
}
}

View File

@ -74,7 +74,6 @@
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Patches\BotOwnerPatch.cs" />
<Compile Include="Patches\PlayerPatch.cs" />
<Compile Include="Patches\PlayerModelViewPatch.cs" />
<Compile Include="SkinHidePlugin.cs" />

View File

@ -54,7 +54,6 @@ namespace SkinHide
new PlayerModelViewPatch().Enable();
new PlayerPatch().Enable();
new BotOwnerPatch().Enable();
}
void Update()