From 2c41d7d817c73864b63033120a35949a5c2e859f Mon Sep 17 00:00:00 2001 From: X <24619207+Undid-Iridium@users.noreply.github.com> Date: Sat, 10 Aug 2024 02:47:30 -0400 Subject: [PATCH] Interacting scp330 compile fix (#43) * My scp built with no issues.. no idea why. * Fixes issue * Harmony suppresses NON harmony errors. --------- Co-authored-by: Yamato <66829532+louis1706@users.noreply.github.com> --- .../Patches/Events/Scp330/InteractingScp330.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/EXILED/Exiled.Events/Patches/Events/Scp330/InteractingScp330.cs b/EXILED/Exiled.Events/Patches/Events/Scp330/InteractingScp330.cs index aea840168..640b224d7 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp330/InteractingScp330.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp330/InteractingScp330.cs @@ -36,6 +36,7 @@ private static IEnumerable Transpiler(IEnumerable Transpiler(IEnumerable instruction.Calls(Method(typeof(Scp330Interobject), nameof(Scp330Interobject.RpcMakeSound)))) + addShouldSeverOffset; int serverEffectLocationStart = -1; int enableEffect = newInstructions.FindLastIndex( - instruction => instruction.LoadsField(Field(typeof(PlayerEffectsController), nameof(ReferenceHub.playerEffectsController)))) + serverEffectLocationStart; - + instruction => instruction.LoadsField(Field(typeof(ReferenceHub), nameof(ReferenceHub.playerEffectsController)))) + serverEffectLocationStart; + newInstructions[enableEffect].WithLabels(enableEffectLabel); newInstructions.InsertRange( addShouldSeverIndex, new[] @@ -91,7 +92,7 @@ private static IEnumerable Transpiler(IEnumerable