diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp index e579796412..7394075442 100644 --- a/src/road_cmd.cpp +++ b/src/road_cmd.cpp @@ -989,7 +989,8 @@ CommandCost CmdBuildLongRoad(DoCommandFlag flags, TileIndex start_tile, TileInde /* Swap direction, also the half-tile drag vars. */ if (start_tile > end_tile || (start_tile == end_tile && start_half)) { dir = ReverseDiagDir(dir); - std::swap(start_half, end_half); + start_half = !start_half; + end_half = !end_half; if (drd == DRD_NORTHBOUND || drd == DRD_SOUTHBOUND) drd ^= DRD_BOTH; } diff --git a/src/road_gui.cpp b/src/road_gui.cpp index 275f039ba8..80a8ed618c 100644 --- a/src/road_gui.cpp +++ b/src/road_gui.cpp @@ -638,14 +638,14 @@ struct BuildRoadToolbarWindow : Window { case DDSP_PLACE_ROAD_X_DIR: case DDSP_PLACE_ROAD_Y_DIR: case DDSP_PLACE_AUTOROAD: { - bool start_half = _place_road_dir == AXIS_Y ? _place_road_start_half_y : _place_road_start_half_y; + bool start_half = _place_road_dir == AXIS_Y ? _place_road_start_half_y : _place_road_start_half_x; if (_remove_button_clicked) { Command::Post(this->rti->strings.err_remove_road, CcPlaySound_CONSTRUCTION_OTHER, start_tile, end_tile, _cur_roadtype, _place_road_dir, start_half, _place_road_end_half); } else { Command::Post(this->rti->strings.err_build_road, CcPlaySound_CONSTRUCTION_OTHER, - start_tile, end_tile, _cur_roadtype, _place_road_dir, _one_way_button_clicked ? DRD_NORTHBOUND : DRD_NONE, start_tile, _place_road_end_half, false); + start_tile, end_tile, _cur_roadtype, _place_road_dir, _one_way_button_clicked ? DRD_NORTHBOUND : DRD_NONE, start_half, _place_road_end_half, false); } break; }