From 5ddb280c8b2f1c634de456e39bc4e210533f6329 Mon Sep 17 00:00:00 2001 From: Metious <71298690+Metious@users.noreply.github.com> Date: Tue, 24 Dec 2024 07:26:07 +0330 Subject: [PATCH] Fixed harmony patching bug for FMOD in BZ --- Nautilus/Patchers/CustomSoundPatcher.cs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/Nautilus/Patchers/CustomSoundPatcher.cs b/Nautilus/Patchers/CustomSoundPatcher.cs index a46fa87b..df50797c 100644 --- a/Nautilus/Patchers/CustomSoundPatcher.cs +++ b/Nautilus/Patchers/CustomSoundPatcher.cs @@ -778,21 +778,14 @@ public static bool FMOD_CustomEmitter_Play_Prefix(FMOD_CustomEmitter __instance) [HarmonyPatch(typeof(FMOD_CustomEmitter), nameof(FMOD_CustomEmitter.Stop))] [HarmonyPrefix] - public static bool FMOD_CustomEmitter_Stop_Prefix(FMOD_CustomEmitter __instance, STOP_MODE stopMode) + public static bool FMOD_CustomEmitter_Stop_Prefix(FMOD_CustomEmitter __instance) { if (!EmitterPlayedChannels.TryGetValue(__instance.GetInstanceID(), out Channel channel)) { return true; } - if (stopMode == STOP_MODE.ALLOWFADEOUT) - { - TryFadeOutBeforeStop(channel); - } - else - { - channel.stop(); - } + TryFadeOutBeforeStop(channel); __instance._playing = false; __instance.OnStop();