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.
Addresses #62.
In CS2, rampbug happens when there's a slope that gets in our way. It's tiny, and will send you way off the ramp once you collide with it.
The solution is to keep track of the previous valid plane, then we move the trace along the previous normal (or in 26 different directions if this normal fails) to see if we can dodge this mini ramp.
If we happen to hit a plane, check if it's a plane that will potentially knock you away still. If it's not a valid plane, we keep moving away from the original plane.
If we moved really far yet we still couldn't dodge it, that means the ramp is sufficiently big and is most likely a legitimate ramp. In that case, we don't do anything.
And if we don't hit anything, trace back to the original end point. Some scenarios can happen: