Change: Build signals to the next junction when dragging regardless of the Ctrl state (#9637)

This commit is contained in:
dP
2024-01-30 23:44:26 +05:30
committed by GitHub
parent 5a88027a19
commit b370ae1212
3 changed files with 6 additions and 6 deletions

View File

@@ -393,13 +393,13 @@ static void HandleAutoSignalPlacement()
* in a network game can specify their own signal density */
if (_remove_button_clicked) {
Command<CMD_REMOVE_SIGNAL_TRACK>::Post(STR_ERROR_CAN_T_REMOVE_SIGNALS_FROM, CcPlaySound_CONSTRUCTION_RAIL,
TileVirtXY(_thd.selstart.x, _thd.selstart.y), TileVirtXY(_thd.selend.x, _thd.selend.y), track, _ctrl_pressed);
TileVirtXY(_thd.selstart.x, _thd.selstart.y), TileVirtXY(_thd.selend.x, _thd.selend.y), track, true);
} else {
bool sig_gui = FindWindowById(WC_BUILD_SIGNAL, 0) != nullptr;
SignalType sigtype = sig_gui ? _cur_signal_type : _settings_client.gui.default_signal_type;
SignalVariant sigvar = sig_gui ? _cur_signal_variant : (TimerGameCalendar::year < _settings_client.gui.semaphore_build_before ? SIG_SEMAPHORE : SIG_ELECTRIC);
Command<CMD_BUILD_SIGNAL_TRACK>::Post(STR_ERROR_CAN_T_BUILD_SIGNALS_HERE, CcPlaySound_CONSTRUCTION_RAIL,
TileVirtXY(_thd.selstart.x, _thd.selstart.y), TileVirtXY(_thd.selend.x, _thd.selend.y), track, sigtype, sigvar, false, _ctrl_pressed, !_settings_client.gui.drag_signals_fixed_distance, _settings_client.gui.drag_signals_density);
TileVirtXY(_thd.selstart.x, _thd.selstart.y), TileVirtXY(_thd.selend.x, _thd.selend.y), track, sigtype, sigvar, false, true, !_settings_client.gui.drag_signals_fixed_distance, _settings_client.gui.drag_signals_density);
}
}