fix: mountable terrain usable for firing heavy weapons agian #4130
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.
Purpose of change
This sets it so mounds of dirt, open windows, and other terrain can support bipods and heavy weapons again.
Fixes #4126
Describe the solution
In ranged.cpp, updated the definition of
is_mountable
to check for passable tiles OR climb difficulty when screening out closed-off vehicle tiles from the check.It seems that stuff that doesn't bother with any climb flags due to being a plain passable terrain, like mounds of dirt for example, are most likely keeping the inherited default climbing difficulty of
INT_MAX
, hence why the check borks because that value is definitely gonna be greater than 5.Describe alternatives you've considered
Pestering @scarf005 to fix it instead.
Testing
Additional context
Discovered while working on #4129
Checklist