When aiming, draw approximate lines of fire for each turret in range #40198
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: Interface "When aiming, draw approximate line of fire for each turret in range"
Purpose of change
Resolves #39557
Aiming UI always draws a single line from player's position to where they aim at.
For some players, it may be confusing: you aim your turrets yet it looks like you would fire from your seat.
Describe the solution
For each turret in range the code calculates a straight line from that turret to target. Due to how cluttered the display may become, the UI by default doesn't draw anything at all, but can be toggled to draw all of these lines.
When aiming a single turret there is no clutter, so line drawing gets automatically enabled (still can be toggled though).
Describe alternatives you've considered
Make this feature work like
SNAP_TO_TARGET
: it can be disabled/enabled by default via settings menu, but can be temporarily toggled on/off for a single session in aiming UI. I think this is unnecessary since turret lines are more of a visual cue and not "real" lines of fire (these are calculated later, when turrets actually fire). Multiple lines together also look kinda meh due to how the game draws them (no connections, just a trail of dots).Testing
It compiles, draws and toggles.
Additional context
There may be more to the linked issue than I understand, but nobody corrected me, so I assume that's what it was. Also, gif!