Skip to content
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

Merged
merged 4 commits into from
Apr 24, 2016
Merged

Fix not being able to wallflip in some places #52

merged 4 commits into from
Apr 24, 2016

Conversation

TomyLobo
Copy link
Collaborator

When hitting SURF_NODRAW, try again with a longer trace that ignores CONTENTS_PLAYERCLIP

This fixes being unable to flip on certain walls.

@TomyLobo TomyLobo added this to the v1.2.1 milestone Apr 24, 2016
// 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)
Copy link
Owner

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?

Copy link
Collaborator Author

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.

@BSVino
Copy link
Owner

BSVino commented Apr 24, 2016

Other than the above comment everything looks good. Ship it.

@TomyLobo TomyLobo merged commit 7508f88 into BSVino:develop Apr 24, 2016
@TomyLobo TomyLobo deleted the fix-wallflips branch April 24, 2016 19:34
@TomyLobo
Copy link
Collaborator Author

I updated the develop branch on Steam with this.
I did some testing together with puswaleh earlier. We were pretty thorough and it's all around much better and we didn't find any spots where there shouldn't be a wallflip allowed.

@TomyLobo TomyLobo changed the title Fix wallflips Fix not being able to wallflip in some places Apr 25, 2016
@BSVino
Copy link
Owner

BSVino commented Apr 26, 2016

Fantastic.

shmopaloppa pushed a commit to shmopaloppa/DoubleAction that referenced this pull request Sep 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants