diff --git a/Patches/HideoutCameraPatches.cs b/Patches/HideoutCameraPatches.cs new file mode 100644 index 0000000..076e932 --- /dev/null +++ b/Patches/HideoutCameraPatches.cs @@ -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; + } +} diff --git a/Plugin.cs b/Plugin.cs index e23bd66..390f2db 100644 --- a/Plugin.cs +++ b/Plugin.cs @@ -71,6 +71,7 @@ public class Plugin : BaseUnityPlugin BarterOfferPatches.Enable(); new UnlockCursorPatch().Enable(); LimitDragPatches.Enable(); + new HideoutCameraPatch().Enable(); } public static bool InRaid()