Conversation
CategorizePosition() can fail to detect ground on sharp/narrow edges (steep surface normals), causing SetGroundEntity(NULL) despite the player standing on geometry. When this happens, CheckJumpButton() miscounts the first jump as an air dash, consuming a charge that should be free. With the Atomizer (air_dash_count=2), this leaves only 1 remaining air dash, producing 2 jumps instead of 3. Add coyote time: track m_flLastOnGroundTime via SetGroundEntity, and in CheckJumpButton() allow a ground jump (instead of air dash) when within a small time window after leaving ground, a surface is confirmed just below the player, and no air dashes have been used yet. Clear the timestamp on ground jump to prevent exploit. ConVar tf_scout_coyote_time (default 0.15s) controls the window.
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.
Bug
On sharp edges, fences, and narrow ledges,
CategorizePosition()can fail to detect valid ground (surface normal z < 0.7, quadrant traces also fail), causingSetGroundEntity(NULL)despite the player standing on geometry.CheckJumpButton()then miscounts the first jump as an air dash, consuming a charge that should have been free. With the Atomizer (air_dash_count=2), this leaves only 1 remaining air dash.Confirmed by the TF2 wiki: "Rarely, the triple jump fails to deploy on a fence and other objects."
Fix
Add coyote time to
CheckJumpButton():m_flLastOnGroundTimeviaSetGroundEntity()when valid ground is foundtf_scout_coyote_time(default 0.15s),AirDash == 0, and a surface is confirmed 4 units below via trace and treat as a ground jump instead of consuming an air dashm_flLastOnGroundTimeon ground jump to prevent exploitThe near-ground trace ensures this only triggers on the edge bug (surface present but undetected), not when walking off ledges or being knocked into the air.