This commit is contained in:
Nick 2023-07-22 01:18:01 -04:00
parent e4e4e20ff4
commit e3d5eca60f

View File

@ -1,4 +1,6 @@
using HarmonyLib;
using NewHorizons.Patches.WarpPatches;
using NewHorizons.Utility.OWML;
using System.Collections.Generic;
using System.Reflection.Emit;
using UnityEngine;
@ -35,8 +37,8 @@ public static class GlobalMusicControllerPatches
)
// Insert a new check to it pointing to the same label as the others
.Insert(
new CodeMatch(OpCodes.Call, AccessTools.Method(typeof(GlobalMusicControllerPatches), nameof(GlobalMusicControllerPatches.IsPlayerInNoAudioVolumes))),
new CodeMatch(OpCodes.Brfalse_S, label)
new CodeInstruction(OpCodes.Call, AccessTools.Method(typeof(GlobalMusicControllerPatches), nameof(GlobalMusicControllerPatches.IsPlayerInNoAudioVolumes))),
new CodeInstruction(OpCodes.Brfalse_S, label)
)
.InstructionEnumeration();
}