From 958cc749ae24ffb84222baf45dbdad770aa1fcee Mon Sep 17 00:00:00 2001 From: Undid-Iridium <24619207+Undid-Iridium@users.noreply.github.com> Date: Fri, 30 May 2025 01:03:23 -0400 Subject: [PATCH 1/2] Should fix --- .../Patches/Events/Scp173/BeingObserved.cs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/EXILED/Exiled.Events/Patches/Events/Scp173/BeingObserved.cs b/EXILED/Exiled.Events/Patches/Events/Scp173/BeingObserved.cs index 8bb058bf7c..5a987b2d2b 100755 --- a/EXILED/Exiled.Events/Patches/Events/Scp173/BeingObserved.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp173/BeingObserved.cs @@ -7,15 +7,20 @@ namespace Exiled.Events.Patches.Events.Scp173 { + using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Reflection.Emit; + using API.Features; + using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp173; using HarmonyLib; + + using PlayerRoles.PlayableScps; using PlayerRoles.PlayableScps.Scp173; using PlayerRoles.Subroutines; @@ -35,13 +40,14 @@ private static IEnumerable Transpiler(IEnumerable x.opcode == OpCodes.Brtrue_S) + offset; - + int offset = 4; + int index = newInstructions.FindIndex(x =>x.Calls(PropertyGetter(typeof(VisionInformation), nameof(VisionInformation.IsLooking)))) + offset; + Console.WriteLine("bahhhh"); + Log.Info("BNahhhhhhhhhhhhh\n\n\n\n\n\n\n\n\n\n"); newInstructions.InsertRange(index, new CodeInstruction[] { // Player.Get(target) - new(OpCodes.Ldarg_1), + new CodeInstruction(OpCodes.Ldarg_1).MoveLabelsFrom(newInstructions[index]), new(OpCodes.Call, Method(typeof(API.Features.Player), nameof(API.Features.Player.Get), new[] { typeof(ReferenceHub) })), // Player.Get(base.Owner) From 544bf74d47aa75f4d9452b939aed39e8290525cc Mon Sep 17 00:00:00 2001 From: Undid-Iridium <24619207+Undid-Iridium@users.noreply.github.com> Date: Fri, 30 May 2025 01:04:39 -0400 Subject: [PATCH 2/2] Remove log --- EXILED/Exiled.Events/Patches/Events/Scp173/BeingObserved.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/EXILED/Exiled.Events/Patches/Events/Scp173/BeingObserved.cs b/EXILED/Exiled.Events/Patches/Events/Scp173/BeingObserved.cs index 5a987b2d2b..8518b601f4 100755 --- a/EXILED/Exiled.Events/Patches/Events/Scp173/BeingObserved.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp173/BeingObserved.cs @@ -42,8 +42,6 @@ private static IEnumerable Transpiler(IEnumerablex.Calls(PropertyGetter(typeof(VisionInformation), nameof(VisionInformation.IsLooking)))) + offset; - Console.WriteLine("bahhhh"); - Log.Info("BNahhhhhhhhhhhhh\n\n\n\n\n\n\n\n\n\n"); newInstructions.InsertRange(index, new CodeInstruction[] { // Player.Get(target)