Skip to content

Commit 9e37127

Browse files
committed
Make seekers bump on sideways jumpthrus properly
Backport of maddie480/MaddieHelpingHand@9e11fdc
1 parent 739e61a commit 9e37127

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Entities/SidewaysJumpThru.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ public static void activateHooks() {
7676
IL.Celeste.Player.SlipCheck += modCollideChecks; // make climbing on jumpthrus not slippery
7777
IL.Celeste.Player.NormalUpdate += modCollideChecks; // get the wall slide effect
7878
IL.Celeste.Player.OnCollideH += modCollideChecks; // handle dashes against jumpthrus properly, without "shifting" down
79+
IL.Celeste.Seeker.OnCollideH += modCollideChecks; // make seekers bump against jumpthrus, instead of vibrating at maximum velocity
7980

8081
// don't make Madeline duck when dashing against a sideways jumpthru
8182
On.Celeste.Player.DuckFreeAt += preventDuckWhenDashingAgainstJumpthru;
@@ -106,6 +107,7 @@ public static void deactivateHooks() {
106107
IL.Celeste.Player.SlipCheck -= modCollideChecks;
107108
IL.Celeste.Player.NormalUpdate -= modCollideChecks;
108109
IL.Celeste.Player.OnCollideH -= modCollideChecks;
110+
IL.Celeste.Seeker.OnCollideH -= modCollideChecks;
109111
hookOnUpdateSprite?.Dispose();
110112

111113
On.Celeste.Player.DuckFreeAt -= preventDuckWhenDashingAgainstJumpthru;
@@ -233,7 +235,7 @@ private static bool entityCollideCheckWithSidewaysJumpthrus(Entity self, Vector2
233235
// and we are checking the collision on the left side of the player for example.
234236
bool collideOnLeftSideOfPlayer = (self.Position.X > checkAtPosition.X);
235237
SidewaysJumpThru jumpthru = self.CollideFirstOutside<SidewaysJumpThru>(checkAtPosition);
236-
return jumpthru != null && self is Player && jumpthru.AllowLeftToRight == collideOnLeftSideOfPlayer
238+
return jumpthru != null && (self is Player || self is Seeker) && jumpthru.AllowLeftToRight == collideOnLeftSideOfPlayer
237239
&& jumpthru.Bottom >= self.Top + checkAtPosition.Y - self.Position.Y + 3;
238240
}
239241

0 commit comments

Comments
 (0)