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 wrong calculation of weapon Angle in demo player #369

Merged
merged 4 commits into from Nov 15, 2015
Merged

Fix wrong calculation of weapon Angle in demo player #369

merged 4 commits into from Nov 15, 2015

Conversation

@user578
Copy link

@user578 user578 commented Nov 13, 2015

Fix wrong calculation of weapon Angle in demo player, more here: http://forum.ddnet.tw/viewtopic.php?f=45&t=2717
and
Add *.dll to .gitignore (for Windows)

@cinaera
Copy link
Contributor

@cinaera cinaera commented Nov 14, 2015

Where does these values (800 and 1600) come from? 256.0f*pi ?

@user578
Copy link
Author

@user578 user578 commented Nov 14, 2015

Yes. Sorry, I had to use pi, my bad.
It should be 256.0f*pi and 256.0f*pi*2 instead of 800 and 1600.

@H-M-H
Copy link
Member

@H-M-H H-M-H commented Nov 14, 2015

Well I tested it and it seems to work, maybe you could shortly explain what was wrong.

@H-M-H
Copy link
Member

@H-M-H H-M-H commented Nov 15, 2015

Looks fine now.

H-M-H added a commit that referenced this pull request Nov 15, 2015
Fix wrong calculation of weapon Angle in demo player
@H-M-H H-M-H merged commit 940e46a into ddnet:master Nov 15, 2015
1 check passed
1 check passed
ci/circleci Your tests passed on CircleCI!
Details
{
Player.m_Angle += 256.0f * 2 * pi;
Angle = mix((float)Prev.m_Angle, (float)Player.m_Angle, IntraTick) / 256.0f;
}

This comment has been minimized.

@heinrich5991

heinrich5991 Nov 15, 2015
Member

Not sure why you're doing it down here instead of near line 409.

This comment has been minimized.

@H-M-H

H-M-H Nov 15, 2015
Member

Well like this it is just executed less often (this correction is not required if you are the local character). In all other cases it is applied.

This comment has been minimized.

@heinrich5991

heinrich5991 Nov 15, 2015
Member

By that logic, you should have moved the assignemnt part of line 409 down here as well.

heinrich5991 added a commit to heinrich5991/ddnet that referenced this pull request Nov 15, 2015
H-M-H added a commit that referenced this pull request Nov 15, 2015
Cleanup of #369
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants