diff --git a/NewHorizons/Patches/BrambleProjectionFixPatches.cs b/NewHorizons/Patches/BrambleProjectionFixPatches.cs new file mode 100644 index 00000000..9d41a251 --- /dev/null +++ b/NewHorizons/Patches/BrambleProjectionFixPatches.cs @@ -0,0 +1,26 @@ +using HarmonyLib; + +namespace NewHorizons.Patches; + +/// +/// Bug fix from the Outsider +/// +[HarmonyPatch] +internal class BrambleProjectionFixPatches +{ + [HarmonyPrefix] + [HarmonyPatch(typeof(FogWarpVolume), nameof(FogWarpVolume.WarpDetector))] + public static bool FogWarpVolume_WarpDetector() + { + // Do not warp the player if they have entered the fog via a projection + return !PlayerState.UsingNomaiRemoteCamera(); + } + + [HarmonyPrefix] + [HarmonyPatch(typeof(FogWarpDetector), nameof(FogWarpDetector.FixedUpdate))] + public static bool FogWarpDetector_FixedUpdate() + { + // Do not warp the player if they have entered the fog via a projection + return !PlayerState.UsingNomaiRemoteCamera(); + } +}