From c114e75297123dfaa78fa7455cd6b184ed03cbef Mon Sep 17 00:00:00 2001 From: Nick Date: Fri, 22 Mar 2024 17:06:31 -0400 Subject: [PATCH] Revert "Reorganize" This reverts commit 27f4222702e2e75e0c782b3f8162f3a38eddcb64. --- .../Patches/BrambleProjectionFixPatches.cs | 26 +++++++++++++++++++ .../VolumePatches/FogWarpVolumePatches.cs | 24 ----------------- 2 files changed, 26 insertions(+), 24 deletions(-) create mode 100644 NewHorizons/Patches/BrambleProjectionFixPatches.cs 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(); + } +} diff --git a/NewHorizons/Patches/VolumePatches/FogWarpVolumePatches.cs b/NewHorizons/Patches/VolumePatches/FogWarpVolumePatches.cs index 60eb0b68..41f3e652 100644 --- a/NewHorizons/Patches/VolumePatches/FogWarpVolumePatches.cs +++ b/NewHorizons/Patches/VolumePatches/FogWarpVolumePatches.cs @@ -42,29 +42,5 @@ namespace NewHorizons.Patches.VolumePatches return true; } } - - /// - /// Bug fix from the Outsider - /// - /// - [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(); - } - - /// - /// Bug fix from the Outsider - /// - /// - [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(); - } } }