Skip to content

Commit bf437c5

Browse files
committed
Fix IL CODE error & remove debug
1 parent ba6d2ce commit bf437c5

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

EXILED/Exiled.Events/Patches/Events/Map/ExplodingFragGrenade.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,9 @@ private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstructi
6161
{
6262
List<CodeInstruction> newInstructions = ListPool<CodeInstruction>.Pool.Get(instructions);
6363

64-
int offset = 2;
65-
int index = newInstructions.FindIndex(i => i.opcode == OpCodes.Ldloc_S && i.operand is LocalBuilder { LocalIndex: 5 }) + offset;
64+
int offset = 1;
65+
int index = newInstructions.FindIndex(i => i.opcode == OpCodes.Stloc_S && i.operand is LocalBuilder { LocalIndex: 5 }) + offset;
6666

67-
Log.Warn($"INDEX OF EXPLODING GRENADE: {index}");
6867
Label continueLabel = generator.DefineLabel();
6968

7069
LocalBuilder ev = generator.DeclareLocal(typeof(ExplodingGrenadeEventArgs));
@@ -120,9 +119,6 @@ private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstructi
120119
new(OpCodes.Stloc_S, 5),
121120
});
122121

123-
for (int z = 0; z < newInstructions.Count; z++)
124-
Log.Info($"[{z}]{newInstructions[z].opcode} : {newInstructions[z].operand} ({newInstructions[z].labels.Count})");
125-
126122
for (int z = 0; z < newInstructions.Count; z++)
127123
yield return newInstructions[z];
128124

0 commit comments

Comments
 (0)