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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user