new-horizons/NewHorizons/Patches/PlayerPatches/PlayerBreathingAudioPatches.cs
Noah Pilarski c768ff4dcd Better vessel warping
- Relative spawning when warping just like vanilla
- Async load just like vanilla
- No more wake up effects for vessel warping
2024-06-04 18:47:34 -04:00

18 lines
585 B
C#

using HarmonyLib;
namespace NewHorizons.Patches.PlayerPatches
{
[HarmonyPatch(typeof(PlayerBreathingAudio))]
public static class PlayerBreathingAudioPatches
{
[HarmonyPrefix]
[HarmonyPatch(nameof(PlayerBreathingAudio.OnWakeUp))]
public static bool PlayerBreathingAudio_OnWakeUp(PlayerBreathingAudio __instance)
{
if (Main.Instance.IsWarpingFromShip || Main.Instance.IsWarpingFromVessel || Main.Instance.DidWarpFromShip || Main.Instance.DidWarpFromVessel)
return false;
return true;
}
}
}