diff --git a/EXILED/Exiled.Events/Patches/Events/Player/IntercomSpeaking.cs b/EXILED/Exiled.Events/Patches/Events/Player/IntercomSpeaking.cs index 902b3d7ed6..08542cd432 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/IntercomSpeaking.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/IntercomSpeaking.cs @@ -38,15 +38,14 @@ private static IEnumerable Transpiler(IEnumerable instruction.Calls(Method(typeof(Stopwatch), nameof(Stopwatch.Restart)))) + offset; + int index = newInstructions.FindIndex(instruction => instruction.StoresField(Field(typeof(Intercom), nameof(Intercom._curSpeaker)))) + offset; newInstructions.InsertRange( index, new CodeInstruction[] { - // Player.Get(this._curSpeaker) - new(OpCodes.Ldarg_0), - new(OpCodes.Ldfld, Field(typeof(Intercom), nameof(Intercom._curSpeaker))), + // Player.Get(first) + new(OpCodes.Ldloc_1), new(OpCodes.Call, Method(typeof(Player), nameof(Player.Get), new[] { typeof(ReferenceHub) })), // true @@ -73,4 +72,4 @@ private static IEnumerable Transpiler(IEnumerable.Pool.Return(newInstructions); } } -} \ No newline at end of file +}