diff --git a/project/SPT.SinglePlayer/Patches/RaidFix/PlayerToggleSoundFixPatch.cs b/project/SPT.SinglePlayer/Patches/RaidFix/PlayerToggleSoundFixPatch.cs deleted file mode 100644 index 24a8298..0000000 --- a/project/SPT.SinglePlayer/Patches/RaidFix/PlayerToggleSoundFixPatch.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System.Reflection; -using SPT.Reflection.Patching; -using Comfort.Common; -using EFT; -using HarmonyLib; -using UnityEngine; - -namespace SPT.SinglePlayer.Patches.RaidFix -{ - /// - /// Fixes an issue with the visor toggle sound not following the player in offline raids - /// - public class PlayerToggleSoundFixPatch : ModulePatch - { - protected override MethodBase GetTargetMethod() - { - return AccessTools.Method(typeof(Player), nameof(Player.PlayToggleSound)); - } - - [PatchPrefix] - private static bool PatchPrefix(ref bool previousState, bool isOn, AudioClip toggleOn, AudioClip toggleOff, Player __instance) - { - // Don't change anything and execute original method if it's not the player that triggers the method - if (!__instance.IsYourPlayer) - { - return true; - } - - if (previousState != isOn) - { - Singleton.Instance.PlayNonspatial(isOn ? toggleOn : toggleOff, BetterAudio.AudioSourceGroupType.Character); - } - - previousState = isOn; - return false; - } - } -} \ No newline at end of file diff --git a/project/SPT.SinglePlayer/SPTSingleplayerPlugin.cs b/project/SPT.SinglePlayer/SPTSingleplayerPlugin.cs index 0c487e0..99d6f6d 100644 --- a/project/SPT.SinglePlayer/SPTSingleplayerPlugin.cs +++ b/project/SPT.SinglePlayer/SPTSingleplayerPlugin.cs @@ -37,7 +37,6 @@ namespace SPT.SinglePlayer new ExfilPointManagerPatch().Enable(); new ScavEncyclopediaPatch().Enable(); new HideoutQuestIgnorePatch().Enable(); - new PlayerToggleSoundFixPatch().Enable(); new SpawnProcessNegativeValuePatch().Enable(); new SpawnPmcPatch().Enable(); new ScavProfileLoadPatch().Enable();