-
Notifications
You must be signed in to change notification settings - Fork 996
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
feat: Ability to limit turret firing arc #7094
Merged
Merged
Changes from 50 commits
Commits
Show all changes
97 commits
Select commit
Hold shift + click to select a range
3ec8e09
Introduce a capability to limit the rotation of a turret.
oo13 b4bf606
Refactoring: some names are changed.
oo13 653cba8
Refactoring: preserve the angles parameter of the constructor to reca…
oo13 d854fd8
The weapon has the "angle of traverse" attribute now.
oo13 480418f
A parameter "angle of traverse" affects an anti-missile turret now.
oo13 21779e3
Apply some feedbacks.
oo13 097c174
Fix a bug where causes a stuck turret when combining with an unrestri…
oo13 e132fbb
Fix a bug where a restricted turret might not return to the idle posi…
oo13 743895c
Change the parameter name "angle of traverse" to "turn range", and fi…
oo13 2869ea0
Change the attribute name "turn range" to "swept angle".
oo13 5424d08
Merge pull request #1 from endless-sky/master
1010todd 5908eb1
Apply suggestions from code review
oo13 96e741b
Apply a suggestion by tehhowch.
oo13 8c8d4f6
Refactor: Add Angle::IsInRange(pair<Angle, Angle>).
oo13 6c9584d
Refactor: Rewrite some comments.
oo13 1cd3460
Refactor: Rename the struct AnglesParameter to BaseAttributes.
oo13 8b5fd8c
Avoid incorrect warning message.
oo13 1d069ed
The idle position of the turrets is calculated when installing, inste…
oo13 c8f57e3
Fix a wrong message of warning.
oo13 0e4dff3
Change the attribute name "swept angle" to "arc".
oo13 d1b63d5
Change the tip's entry "swept angle:" to "arc:".
oo13 8811090
Merge branch 'master' into limited_turret_turning_angle
oo13 22517dd
Merge branch 'endless-sky:master' into master
1010todd 481422d
Merge branch 'endless-sky:master' into master
1010todd 47dac5b
Merge branch 'endless-sky:master' into master
1010todd 80f00a6
Merge branch 'endless-sky:master' into master
1010todd 09ed7e6
Merge branch 'endless-sky:master' into master
1010todd d78439a
Merge branch 'limited_turret_turning_angle' of https://github.com/oo1…
1010todd d364cf1
Merge branch 'oo13-limited_turret_turning_angle' into limited-turret-arc
1010todd 0a7fae5
Update
1010todd 6750720
Make arc relative to turret angle.
1010todd 8a552c5
Write warning.
1010todd 57ca304
Make idle sweeping works with arc.
1010todd d39308f
Fix trailing whitespace.
1010todd 5f1072c
Update source/AI.cpp
1010todd cf70a3d
Change variable name from arc to maxAngle for weapon.
1010todd b9b8369
Merge branch 'limited-turret-arc' of https://github.com/1010todd/endl…
1010todd 4269a96
Corrected warning location
1010todd 4ecc644
Remove (probably) unnecessary calculation.
1010todd cbcef29
Merge branch 'endless-sky:master' into master
1010todd 90745ca
Corrected arc output to save file.
1010todd 756b625
Apply comment grammar from code review
1010todd 45d2fb5
arc pair to minArc and maxArc
1010todd 491d52f
Move guard if to the top of UpdateArc()
1010todd 5f5a083
Fix warning.
1010todd da0eb72
Merge branch 'endless-sky:master' into master
1010todd e0de25c
Apply suggestion from oo13
1010todd 25c7eef
Don't round when writing to save file.
1010todd 810d89c
Merge branch 'endless-sky:master' into master
1010todd ed03ee5
Merge branch 'endless-sky:master' into master
1010todd c153695
Merge branch 'master' into limited-turret-arc
1010todd 660389c
Fix compile error.
1010todd d8e255c
Merge branch 'endless-sky:master' into master
1010todd b1b7956
Merge branch 'endless-sky:master' into limited-turret-arc
1010todd 9c35d02
Codestyle fixes
1010todd a697d79
Merge branch 'endless-sky:master' into master
1010todd fee3e16
Merge branch 'endless-sky:master' into master
1010todd 52db9cc
Merge branch 'endless-sky:master' into master
1010todd 19523f1
Merge branch 'endless-sky:master' into master
1010todd d989281
Merge branch 'endless-sky:master' into master
1010todd 381489e
Remove unnecessary include(?)
1010todd 5f7fd7e
Add comment
1010todd 66ecd02
Remove unnecessary IsInRange overload
1010todd 93f11a7
Merge branch 'endless-sky:master' into master
1010todd d3f9b63
Merge branch 'endless-sky:master' into master
1010todd e2d769c
Merge branch 'endless-sky:master' into master
1010todd ee8a4b6
Apply suggestion
1010todd 9f921e2
Merge remote-tracking branch 'origin' into limited-turret-arc
1010todd 063502c
Merge branch 'limited-turret-arc' of https://github.com/1010todd/endl…
1010todd 642bf63
Merge remote-tracking branch 'upstream' into limited-turret-arc
1010todd 7634191
Fix angle flipping when saving again
1010todd 48eaf09
Merge branch 'master' into limited-turret-arc
1010todd 87fed4f
Merge branch 'endless-sky:master' into limited-turret-arc
1010todd d257a67
Merge branch 'master' into limited-turret-arc
1010todd 715b885
Merge branch 'master' into limited-turret-arc
1010todd 6229762
Merge branch 'endless-sky:master' into limited-turret-arc
1010todd 25b62aa
Merge branch 'master' into limited-turret-arc
1010todd 04789db
Merge branch 'master' into limited-turret-arc
1010todd a167f62
Merge branch 'master' into limited-turret-arc
1010todd d111417
Move arc check to FireSpecialSystem()
1010todd 8b87f7d
More newlines
1010todd 0393e23
Merge branch 'master' into limited-turret-arc
1010todd 93f8276
Merge branch 'master' into limited-turret-arc
1010todd 6b37ec5
No longer use number in var name
1010todd 4e53cb7
Merge branch 'limited-turret-arc' of https://github.com/1010todd/endl…
1010todd 285c83f
Apply suggestions from code review
1010todd 608c8b7
Fix missing variable and duplicate declaration
1010todd 4ba0a79
Apply suggestions from code review
1010todd 9407bed
Remove #include <utility>
1010todd 5137733
Remove another #include <utility>
1010todd be42176
Create test_angleIsInRange.cpp
1010todd 36e05bc
Update CMakeLists.txt
1010todd 8a9ee3b
Moved the test to test_angle.cpp
1010todd 213c28b
Merge branch 'master' into limited-turret-arc
1010todd 5a6fdbc
Add comment and remove unnecessary curly bracket
1010todd 09eb2ba
Use swap line end for test stuffs back to LF.
1010todd 5117608
Remove unnecessary variable.
petervdmeer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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.
Simple Check: If it's not omnidirectional, obviously the range of
offset
is (-360, +360) degrees, but Angle::Degrees() returns [-180, +180), therefore this logic is incorrect.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.
I've looked at it you're right, but I'm not too sure what to do with it. Should I make a copy of
Angle::Degrees()
that return (-360, +360)?(Also sorry for very late reply, I looked at it and have no idea what to do and kinda forgot.)
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.
you have checked that this gives you no numbers higher than 360 or lower than -360?