Skip to content

Commit 07cd73e

Browse files
committed
(fix) Restore manual aiming across z-levels
Fully remove never-set variable and checks for it that prevented manual z-level aiming. This was previously set based on the z-levels option, but that option was removed in #9543 and the variable remained still checked (and thus could never be true). This seemed unintentional and broke manual aiming across z-levels.
1 parent 4b08dfb commit 07cd73e

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

src/ranged.cpp

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -481,8 +481,6 @@ class target_ui
481481
// List of visible hostile targets
482482
std::vector<Creature *> targets;
483483

484-
// 'true' if map has z levels and 3D fov is on
485-
bool allow_zlevel_shift = false;
486484
// Snap camera to cursor. Can be permanently toggled in settings
487485
// or temporarily in this window
488486
bool snap_to_target = false;
@@ -3235,10 +3233,8 @@ void target_ui::init_window_and_input()
32353233
ctxt.register_action( "zoom_out" );
32363234
ctxt.register_action( "zoom_in" );
32373235
ctxt.register_action( "TOGGLE_MOVE_CURSOR_VIEW" );
3238-
if( allow_zlevel_shift ) {
3239-
ctxt.register_action( "LEVEL_UP" );
3240-
ctxt.register_action( "LEVEL_DOWN" );
3241-
}
3236+
ctxt.register_action( "LEVEL_UP" );
3237+
ctxt.register_action( "LEVEL_DOWN" );
32423238
if( mode == TargetMode::Fire || mode == TargetMode::TurretManual || ( mode == TargetMode::Shape &&
32433239
relevant->is_gun() ) ) {
32443240
ctxt.register_action( "SWITCH_MODE" );
@@ -4262,9 +4258,7 @@ void target_ui::panel_cursor_info( int &text_y )
42624258

42634259
std::vector<std::string> labels;
42644260
labels.push_back( label_range );
4265-
if( allow_zlevel_shift ) {
4266-
labels.push_back( string_format( _( "Elevation: %d" ), dst.z() - src.z() ) );
4267-
}
4261+
labels.push_back( string_format( _( "Elevation: %d" ), dst.z() - src.z() ) );
42684262
labels.push_back( string_format( _( "Targets: %d" ), targets.size() ) );
42694263

42704264
nc_color col = c_light_gray;

0 commit comments

Comments
 (0)