Skip to content

Commit a56445e

Browse files
committed
Extend DetourContext to ensure Everest Core compatibility
1 parent da57e53 commit a56445e

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

Entities/UpsideDownJumpThru.cs

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -70,20 +70,19 @@ public static void activateHooks() {
7070
using (new DetourContext { After = { "*" } }) {
7171
// fix player specific behavior allowing them to go through upside-down jumpthrus.
7272
On.Celeste.Player.ctor += onPlayerConstructor;
73-
}
74-
7573

76-
// block player if they try to climb past an upside-down jumpthru.
77-
IL.Celeste.Player.ClimbUpdate += patchPlayerClimbUpdate;
74+
// block player if they try to climb past an upside-down jumpthru.
75+
IL.Celeste.Player.ClimbUpdate += patchPlayerClimbUpdate;
7876

79-
// ignore upside-down jumpthrus in select places.
80-
playerOrigUpdateHook = new ILHook(typeof(Player).GetMethod("orig_Update"), filterOutJumpThrusFromCollideChecks);
81-
IL.Celeste.Player.DashUpdate += filterOutJumpThrusFromCollideChecks;
82-
IL.Celeste.Player.RedDashUpdate += filterOutJumpThrusFromCollideChecks;
83-
IL.Celeste.Actor.MoveVExact += filterOutJumpThrusFromCollideChecks;
77+
// ignore upside-down jumpthrus in select places.
78+
playerOrigUpdateHook = new ILHook(typeof(Player).GetMethod("orig_Update"), filterOutJumpThrusFromCollideChecks);
79+
IL.Celeste.Player.DashUpdate += filterOutJumpThrusFromCollideChecks;
80+
IL.Celeste.Player.RedDashUpdate += filterOutJumpThrusFromCollideChecks;
81+
IL.Celeste.Actor.MoveVExact += filterOutJumpThrusFromCollideChecks;
8482

85-
// listen for the player unducking, to knock the player down before they would go through upside down jumpthrus.
86-
On.Celeste.Player.Update += onPlayerUpdate;
83+
// listen for the player unducking, to knock the player down before they would go through upside down jumpthrus.
84+
On.Celeste.Player.Update += onPlayerUpdate;
85+
}
8786
}
8887

8988
public static void deactivateHooks() {

0 commit comments

Comments
 (0)