Skip to content

Commit 3ef3c8d

Browse files
committed
Revert "Fix being able to clip through upside down jumpthrus by unducking"
This reverts commit 0d5466b.
1 parent 0d5466b commit 3ef3c8d

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

Entities/UpsideDownJumpThru.cs

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ class UpsideDownJumpThru : JumpThru {
2121

2222
private static ILHook playerOrigUpdateHook;
2323

24-
private static readonly Hitbox normalHitbox = new Hitbox(8f, 11f, -4f, -11f);
25-
2624
public static void Load() {
2725
using (new DetourContext { Before = { "*" } }) { // these don't always call the orig methods, better apply them first.
2826
// fix general actor/platform behavior to make them comply with jumpthrus.
@@ -44,9 +42,6 @@ public static void Load() {
4442
playerOrigUpdateHook = new ILHook(typeof(Player).GetMethod("orig_Update"), filterOutJumpThrusFromCollideChecks);
4543
IL.Celeste.Player.DashUpdate += filterOutJumpThrusFromCollideChecks;
4644
IL.Celeste.Player.RedDashUpdate += filterOutJumpThrusFromCollideChecks;
47-
48-
// listen for the player unducking, to knock the player down before they would go through upside down jumpthrus.
49-
On.Celeste.Player.Update += onPlayerUpdate;
5045
}
5146
}
5247

@@ -60,8 +55,6 @@ public static void Unload() {
6055
playerOrigUpdateHook?.Dispose();
6156
IL.Celeste.Player.DashUpdate -= filterOutJumpThrusFromCollideChecks;
6257
IL.Celeste.Player.RedDashUpdate -= filterOutJumpThrusFromCollideChecks;
63-
64-
On.Celeste.Player.Update -= onPlayerUpdate;
6558
}
6659

6760
private static bool onActorMoveVExact(On.Celeste.Actor.orig_MoveVExact orig, Actor self, int moveV, Collision onCollide, Solid pusher) {
@@ -296,25 +289,6 @@ private static void patchPlayerClimbUpdate(ILContext il) {
296289
}
297290
}
298291

299-
private static void onPlayerUpdate(On.Celeste.Player.orig_Update orig, Player self) {
300-
bool unduckWouldGoThroughPlatform = self.Ducking && !self.CollideCheck<UpsideDownJumpThru>();
301-
if (unduckWouldGoThroughPlatform) {
302-
Collider bak = self.Collider;
303-
self.Collider = normalHitbox;
304-
unduckWouldGoThroughPlatform = self.CollideCheck<UpsideDownJumpThru>();
305-
self.Collider = bak;
306-
}
307-
308-
orig(self);
309-
310-
if (unduckWouldGoThroughPlatform && !self.Ducking) {
311-
// we just unducked, and are now inside an upside-down jumpthru.
312-
// knock the player down if possible!
313-
while (self.CollideCheck<UpsideDownJumpThru>() && !self.CollideCheck<Solid>(self.Position + new Vector2(0f, 1f))) {
314-
self.Position.Y++;
315-
}
316-
}
317-
}
318292

319293

320294

0 commit comments

Comments
 (0)