-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix not being able to wallflip in some places #52
Conversation
…CONTENTS_PLAYERCLIP This fixes being unable to flip on certain walls.
// Don't flip if the player is sliding or getting up from sliding. | ||
if (tr.fraction < 1 && !(tr.surface.flags & (SURF_SKY | SURF_NODRAW)) && fabs(tr.plane.normal[2]) < 0.7 && vecForward.Dot(tr.plane.normal) < -0.7f | ||
&& !m_pSDKPlayer->m_Shared.IsSliding() && !m_pSDKPlayer->m_Shared.IsGettingUpFromProne() && !m_pSDKPlayer->m_Shared.IsGettingUpFromSlide()) | ||
if (tr.fraction < 1 && !(tr.surface.flags & (SURF_SKY | SURF_NODRAW)) && fabs(tr.plane.normal[2]) < 0.7 && vecForward.Dot(tr.plane.normal) < -0.7f) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why moving this does anything?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At first I planned to duplicate the entire section to do two traces, but it turned out to be unnecessary.
I left the move in because we save some traces here in the general case.
Other than the above comment everything looks good. Ship it. |
I updated the develop branch on Steam with this. |
Fantastic. |
Fix wallflips
When hitting SURF_NODRAW, try again with a longer trace that ignores CONTENTS_PLAYERCLIP
This fixes being unable to flip on certain walls.