Skip to content

Ceiling springs move the player 2px less than they're supposed to. #16

@whatsGravity

Description

@whatsGravity

Ceiling springs don't move the player to below the spring correctly, causing (for example) buffered dashes out of spring hits to rehit the spring.

player.SuperBounce(Bottom + player.Height);

In this context, player.Height=9, as the current collider is checking for interaction with entities, so is the hurtbox. The fromY passed into SuperBounce is therefore Spring.Bottom+9.

The start of SuperBounce looks like:

public void SuperBounce(float fromY)
{
    ...
    Collider collider = base.Collider;
    base.Collider = normalHitbox;
    MoveV(fromY - base.Bottom);

Here, the collider is set to the normal hitbox, so player.Height = 11, meaning that base.Bottom is 2 pixels lower than expected, so fromY = Spring.Bottom-2. I.e, you get moved 2px fewer down than you should, putting you back into the spring.

The simplest fix is likely to just add 2 to fromY when hitting a ceiling spring. But, this might not account for hitting the spring with unusual hitboxes, so a more robust solution might be needed.
I would submit a PR myself but I'd guess the old spring behavior should be legacied for TAS's, and I'm not familiar with how to do that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions