mirror of
https://github.com/sp-tarkov/modules.git
synced 2025-02-13 09:50:43 -05:00
Should make the BTR work again. I've also switched named methods to use "nameof" where it made sense. And removed an unnecessary method call and fixed an incorrect async on one of my patches Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com> Reviewed-on: SPT-AKI/Modules#59 Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com> Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
25 lines
604 B
C#
25 lines
604 B
C#
using Aki.Reflection.Patching;
|
|
using EFT.Vehicle;
|
|
using HarmonyLib;
|
|
using System.Reflection;
|
|
using UnityEngine;
|
|
|
|
namespace Aki.Debugging.BTR.Patches
|
|
{
|
|
public class BTRTurretDefaultAimingPositionPatch : ModulePatch
|
|
{
|
|
protected override MethodBase GetTargetMethod()
|
|
{
|
|
return AccessTools.Method(typeof(BTRTurretServer), nameof(BTRTurretServer.Start));
|
|
}
|
|
|
|
[PatchPrefix]
|
|
public static bool PatchPrefix(BTRTurretServer __instance)
|
|
{
|
|
__instance.defaultAimingPosition = Vector3.zero;
|
|
|
|
return false;
|
|
}
|
|
}
|
|
}
|