diff --git a/EXILED/Exiled.Events/Patches/Events/Scp1507/AttackingDoor.cs b/EXILED/Exiled.Events/Patches/Events/Scp1507/AttackingDoor.cs index bbe2df585..dc62cceba 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp1507/AttackingDoor.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp1507/AttackingDoor.cs @@ -33,19 +33,17 @@ private static IEnumerable Transpiler(IEnumerable newInstructions = ListPool.Pool.Get(instructions); - int offset = -5; + int offset = -4; int index = newInstructions.FindIndex(x => x.opcode == OpCodes.Ldloc_S) + offset; Label continueLabel = generator.DefineLabel(); - newInstructions[index].labels.Add(continueLabel); - newInstructions.InsertRange( index, new CodeInstruction[] { // Player.Get(this.Owner); - new(OpCodes.Ldarg_0), + new CodeInstruction(OpCodes.Ldarg_0).MoveLabelsFrom(newInstructions[index]), new(OpCodes.Callvirt, PropertyGetter(typeof(Scp1507AttackAbility), nameof(Scp1507AttackAbility.Owner))), new(OpCodes.Call, Method(typeof(Player), nameof(Player.Get), new[] { typeof(ReferenceHub) })), @@ -69,6 +67,8 @@ private static IEnumerable Transpiler(IEnumerable