Block hideout camera movement when area is selected
This commit is contained in:
20
Patches/HideoutCameraPatches.cs
Normal file
20
Patches/HideoutCameraPatches.cs
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -71,6 +71,7 @@ public class Plugin : BaseUnityPlugin
|
|||||||
BarterOfferPatches.Enable();
|
BarterOfferPatches.Enable();
|
||||||
new UnlockCursorPatch().Enable();
|
new UnlockCursorPatch().Enable();
|
||||||
LimitDragPatches.Enable();
|
LimitDragPatches.Enable();
|
||||||
|
new HideoutCameraPatch().Enable();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool InRaid()
|
public static bool InRaid()
|
||||||
|
|||||||
Reference in New Issue
Block a user