Block hideout camera movement when area is selected

This commit is contained in:
Tyfon
2024-08-12 17:36:43 -07:00
parent 9324922f82
commit e76d2515cf
2 changed files with 21 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
using EFT.Hideout;
using HarmonyLib;
using SPT.Reflection.Patching;
using System.Reflection;
namespace UIFixes;
public class HideoutCameraPatch : ModulePatch
{
protected override MethodBase GetTargetMethod()
{
return AccessTools.Method(typeof(HideoutCameraController), nameof(HideoutCameraController.LateUpdate));
}
[PatchPrefix]
public static bool Prefix(HideoutCameraController __instance)
{
return !__instance.AreaSelected;
}
}

View File

@@ -71,6 +71,7 @@ public class Plugin : BaseUnityPlugin
BarterOfferPatches.Enable();
new UnlockCursorPatch().Enable();
LimitDragPatches.Enable();
new HideoutCameraPatch().Enable();
}
public static bool InRaid()