Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
IRacle1 committed Dec 26, 2024
1 parent ffbefec commit 9c92b7f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions EXILED/Exiled.Events/Patches/Events/Scp1507/AttackingDoor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,12 @@ private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstructi

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) })),

Expand All @@ -69,6 +67,8 @@ private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstructi
// return false;
new(OpCodes.Ldc_I4_0),
new(OpCodes.Ret),

new CodeInstruction(OpCodes.Nop).WithLabels(continueLabel),
});

for (int z = 0; z < newInstructions.Count; z++)
Expand Down

0 comments on commit 9c92b7f

Please sign in to comment.