Take bramble projection fix from the outsider (#819)

## Bug fixes
- Fixes a bug where projecting into Dark Bramble can teleport you
(thanks @TRSasasusu for the fix from the Outsider)
This commit is contained in:
Noah Pilarski 2024-03-22 16:46:30 -04:00 committed by GitHub
commit b8f292b137
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -0,0 +1,26 @@
using HarmonyLib;
namespace NewHorizons.Patches;
/// <summary>
/// Bug fix from the Outsider
/// </summary>
[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();
}
}