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

When aiming, draw approximate lines of fire for each turret in range #40198

Merged
merged 4 commits into from
May 8, 2020
Merged

When aiming, draw approximate lines of fire for each turret in range #40198

merged 4 commits into from
May 8, 2020

Conversation

olanti-p
Copy link
Contributor

@olanti-p olanti-p commented May 5, 2020

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!
lines

@ifreund ifreund added <Enhancement / Feature> New features, or enhancements on existing [C++] Changes (can be) made in C++. Previously named `Code` Info / User Interface Game - player communication, menus, etc. labels May 5, 2020
@olanti-p
Copy link
Contributor Author

olanti-p commented May 7, 2020

Force-pushed to remove already merged commits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` <Enhancement / Feature> New features, or enhancements on existing Info / User Interface Game - player communication, menus, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vehicle-mounted turrets always shoot from driver's seat instead of their own place
3 participants