-
Notifications
You must be signed in to change notification settings - Fork 334
fix: stops jumping hovers from reaching orbit #7031
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
Conversation
…constantly increasing its height
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #7031 +/- ##
============================================
+ Coverage 30.22% 30.40% +0.18%
- Complexity 15889 16167 +278
============================================
Files 2895 2895
Lines 284655 284659 +4
Branches 49529 49531 +2
============================================
+ Hits 86036 86558 +522
+ Misses 192992 192129 -863
- Partials 5627 5972 +345 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Nice! |
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.
Pull Request Overview
This PR fixes jumping elevation issues for units in WiGE and HOVER modes and addresses an out-of-bounds exception in bridge collapse handling. Key changes include:
- Adding and updating several unit tests in JumpTest.java and MovePathTest.java to validate jump behavior.
- Adjusting elevation calculations in MoveStep.java to correctly handle WiGE and HOVER movement modes.
- Updating comments and safeguards in TWGameManager.java to prevent OOB exceptions and ensuring clarity in load handling across floors.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| megamek/unittests/megamek/common/movepath/JumpTest.java | Added comprehensive tests for jump paths across multiple terrains. |
| megamek/unittests/megamek/common/MovePathTest.java | Minor import reordering to follow test conventions. |
| megamek/src/megamek/server/totalwarfare/TWGameManager.java | Updated comments related to collapse load safeguards and added import. |
| megamek/src/megamek/common/MoveStep.java | Modified elevation logic using a switch statement for movement modes. |
5a65786 to
9dd1e6c
Compare
9dd1e6c to
acd5f76
Compare
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.
Looks good to me; I'm loving the new tests!
What it does?
Fixes the way elevation is set for units with MovementMode WiGE and HOVER during jumping, and fixes an OOB exception on collapsing bridges.
In a unit test I managed to reproduce the bug where hovers take flight after jumping over a building.
Related issues: