Fix helicopters silently failing to ascend #1538
Merged
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.
Summary
SUMMARY: Bugfixes "Helicopters now print a message on failing to ascend due to lack of engine power, instead of silent failure"
Purpose of change
I'd been wanting to figure out how to fix the annoyance where helicopters would fail silently, with no message, if you tried to ascend but couldn't due to lack of power. It took a lot of rooting through a fairly complex chain of functions, giving up, then working through the opposite direction by figuring out what actually happens internally when you press
<
, before I finally found how to fix that.Describe the solution
Updated
game::handle_action
so that triggering theACTION_MOVE_UP
will check for if you're in the circumstance of a helicopter trying and failing to ascend, and if so print a message to hint at the problem.Describe alternatives you've considered
Continue going in circles looking at how the vehicle move functions seem to go back and forth until I go insane.
Testing
Additional context