mirror of
https://github.com/sp-tarkov/modules.git
synced 2025-02-13 04:50:45 -05:00
No longer needed
This commit is contained in:
parent
b62b9b2afe
commit
b7f487bbb6
@ -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
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Fixes an issue with the visor toggle sound not following the player in offline raids
|
|
||||||
/// </summary>
|
|
||||||
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<BetterAudio>.Instance.PlayNonspatial(isOn ? toggleOn : toggleOff, BetterAudio.AudioSourceGroupType.Character);
|
|
||||||
}
|
|
||||||
|
|
||||||
previousState = isOn;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -37,7 +37,6 @@ namespace SPT.SinglePlayer
|
|||||||
new ExfilPointManagerPatch().Enable();
|
new ExfilPointManagerPatch().Enable();
|
||||||
new ScavEncyclopediaPatch().Enable();
|
new ScavEncyclopediaPatch().Enable();
|
||||||
new HideoutQuestIgnorePatch().Enable();
|
new HideoutQuestIgnorePatch().Enable();
|
||||||
new PlayerToggleSoundFixPatch().Enable();
|
|
||||||
new SpawnProcessNegativeValuePatch().Enable();
|
new SpawnProcessNegativeValuePatch().Enable();
|
||||||
new SpawnPmcPatch().Enable();
|
new SpawnPmcPatch().Enable();
|
||||||
new ScavProfileLoadPatch().Enable();
|
new ScavProfileLoadPatch().Enable();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user