2024-01-12 08:54:12 +00:00
|
|
|
|
using Aki.Reflection.Patching;
|
|
|
|
|
using EFT.Vehicle;
|
|
|
|
|
using HarmonyLib;
|
|
|
|
|
using System.Reflection;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
2024-01-23 08:47:09 +00:00
|
|
|
|
namespace Aki.Custom.BTR.Patches
|
2024-01-12 08:54:12 +00:00
|
|
|
|
{
|
2024-01-23 08:47:09 +00:00
|
|
|
|
public class BTRTurretDefaultAimingPositionPatch : ModulePatch
|
2024-01-12 08:54:12 +00:00
|
|
|
|
{
|
|
|
|
|
protected override MethodBase GetTargetMethod()
|
|
|
|
|
{
|
2024-01-14 09:05:13 +00:00
|
|
|
|
return AccessTools.Method(typeof(BTRTurretServer), nameof(BTRTurretServer.Start));
|
2024-01-12 08:54:12 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[PatchPrefix]
|
2024-01-20 09:20:32 +00:00
|
|
|
|
private static bool PatchPrefix(BTRTurretServer __instance)
|
2024-01-12 08:54:12 +00:00
|
|
|
|
{
|
|
|
|
|
__instance.defaultAimingPosition = Vector3.zero;
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|