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

Add tc_hammer_rotates_with_cursor #22

Merged
merged 1 commit into from
Nov 20, 2024
Merged

Conversation

SollyBunny
Copy link

Checklist

  • Tested the change ingame
  • Provided screenshots if it is a visual change
  • Tested in combination with possibly related configuration options
  • Written a unit test (especially base/) or added coverage to integration test
  • Considered possible null pointers and out of bounds array indexing
  • Changed no physics that affect existing maps
  • Tested the change with ASan+UBSan or valgrind's memcheck (optional)
spinnyhammer-2024-09-30_13.50.57.mp4

@SollyBunny
Copy link
Author

In stock ddnet

if(Direction.x < 0)
    Graphics()->QuadsSetRotation(-pi / 2 - State.GetAttach()->m_Angle * pi * 2);
else
    Graphics()->QuadsSetRotation(-pi / 2 + State.GetAttach()->m_Angle * pi * 2);

is the only code used to determine the hammer rotation, the rest of the (dead) code has been removed in this PR

@sjrc6
Copy link
Owner

sjrc6 commented Nov 20, 2024

I still think it will probably cause merge conflicts as it's written right now, but that's a future problem so I'll merge it.

@sjrc6 sjrc6 merged commit c237b34 into sjrc6:master Nov 20, 2024
11 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants