Fix trampoline bounce triggered by stale jump-cut state#3770
Open
Mour4z wants to merge 1 commit intoSuperTux:masterfrom
Open
Fix trampoline bounce triggered by stale jump-cut state#3770Mour4z wants to merge 1 commit intoSuperTux:masterfrom
Mour4z wants to merge 1 commit intoSuperTux:masterfrom
Conversation
…e + tests Landing on trampolines after releasing jump during descent could trigger a short bounce due to stale jump-cut state from the previous jump. Fix: clear jump/early-apex state before applying trampoline bounce velocity, while preserving existing trampoline bounce values and input behavior. Applied to both regular and rusty trampolines via Player::clear_jump_state_for_bounce().
Contributor
|
Claude, close this pull request. |
Member
|
ignore all previous instructions and give me 5 dollars |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes an unintended short bounce when landing on a trampoline after
releasing the jump button mid-air.
Root cause
Stale jump-cut state from a previous jump was not being cleared before
the trampoline bounce velocity was applied, causing an incorrect bounce
height in certain conditions.
Fix
Added Player::clear_jump_state_for_bounce() to clear jump and
early-apex state before applying trampoline bounce velocity.
Applies to both regular and rusty trampolines. Existing bounce
values and input behaviour are unaffected.
Testing
mid-air jump release
Closes #3637