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

Fixes #5053 Update Aero movement envelope when accelerating or decelerating. #5054

Merged
merged 3 commits into from
Jan 17, 2024

Conversation

HoneySkull
Copy link
Collaborator

This PR fixes #5053 - When in the movement phase while moving an Aerospace entity, a "delta-v" is maintained during the selected unit's movement so that an Aero movement envelope can be dynamically updated when the pilot accelerates or decelerates at the beginning of the turn.

As it is, the movement envelope is static to the initial velocity of the craft upon entering the movement phase.

@HoneySkull HoneySkull marked this pull request as draft January 14, 2024 21:06
@HoneySkull
Copy link
Collaborator Author

I found a better way to implement this. Instead of maintaining a delta-v, the MovePath object already has a function that determines the 'final velocity'. I am going to re-do this so that it uses that instead. The major advantage is that it's already using existing code, AND it will automatically be up-to-date when cycling through the backspace key. (Say, when a user accelerates multiple MP and they backspace and unwind... the first draft wasn't handling that case well.

@HoneySkull
Copy link
Collaborator Author

Yeah, this works much better with backtracking through the move path and is all around simpler code. Less to go wrong.

@HoneySkull HoneySkull marked this pull request as ready for review January 14, 2024 21:53
@HammerGS HammerGS merged commit de8995b into MegaMek:master Jan 17, 2024
4 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.

Aerospace movement envelope doesn't update when accelerating or decelerating in movement phase.
3 participants