Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions EXILED/Exiled.Events/Patches/Events/Player/Jumping.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstructi
// after ProcessJump, store its result
newInstructions.Insert(index, new CodeInstruction(OpCodes.Stloc, jumping));

// offset here is 0
index = newInstructions.FindIndex(instruction => instruction.opcode == OpCodes.Brfalse_S);
offset = 1;
index = newInstructions.FindIndex(instruction => instruction.StoresField(Field(typeof(FpcMotor), nameof(FpcMotor._maxFallSpeed)))) + offset;

// make br_false use stored value
newInstructions.Insert(index, new CodeInstruction(OpCodes.Ldloc, jumping));
Expand Down
Loading