From ba27d481816f39c6ecc7d385363baebc81409c29 Mon Sep 17 00:00:00 2001 From: olanti-p Date: Tue, 5 May 2020 21:30:23 +0300 Subject: [PATCH] Enable it by default if aiming a single turret --- src/ranged.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ranged.cpp b/src/ranged.cpp index dacac32f74b57..61982516d2fb1 100644 --- a/src/ranged.cpp +++ b/src/ranged.cpp @@ -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 ); @@ -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( "FOV_3D" ); snap_to_target = get_option( "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 );