Skip to content

Commit

Permalink
Enable it by default if aiming a single turret
Browse files Browse the repository at this point in the history
  • Loading branch information
olanti-p committed May 7, 2020
1 parent 17b13fe commit ba27d48
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/ranged.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ class target_ui

// If true, draws turret lines
// relevant for TargetMode::Turrets
bool draw_turret_lines;
bool draw_turret_lines = false;

// Create window and set up input context
void init_window_and_input( player &pc );
Expand Down Expand Up @@ -1862,7 +1862,11 @@ target_handler::trajectory target_ui::run( player &pc, ExitCode *exit_code )
// Load settings
allow_zlevel_shift = g->m.has_zlevels() && get_option<bool>( "FOV_3D" );
snap_to_target = get_option<bool>( "SNAP_TO_TARGET" );
draw_turret_lines = false;
if( mode == TargetMode::Turrets ) {
// Due to how cluttered the display would become, disable it by default
// unless aiming a single turret.
draw_turret_lines = vturrets->size() == 1;
}

// Create window
init_window_and_input( pc );
Expand Down

0 comments on commit ba27d48

Please sign in to comment.