- diff --git a/src/road_gui.cpp b/src/road_gui.cpp
- index 92c660e..8d6c123 100644
- --- a/src/road_gui.cpp
- +++ b/src/road_gui.cpp
- @@ -60,6 +60,7 @@ DECLARE_ENUM_AS_BIT_SET(RoadFlags)
- static RoadFlags _place_road_flag;
- static RoadType _cur_roadtype;
- +bool _catenary_flag;
- static DiagDirection _road_depot_orientation;
- static DiagDirection _road_station_picker_orientation;
- @@ -361,11 +362,10 @@ struct BuildRoadToolbarWindow : Window {
- {
- /* The remove and the one way button state is driven
- * by the other buttons so they don't act on themselves.
- - * Both are only valid if they are able to apply as options. */
- + * They are only valid if they are able to apply as options. */
- switch (clicked_widget) {
- case WID_ROT_REMOVE:
- this->RaiseWidget(WID_ROT_ONE_WAY);
- - this->SetWidgetDirty(WID_ROT_ONE_WAY);
- break;
- case WID_ROT_ONE_WAY:
- @@ -626,7 +626,7 @@ struct BuildRoadToolbarWindow : Window {
- * not the 3rd bit set) */
- _place_road_flag = (RoadFlags)((_place_road_flag & RF_DIR_Y) ? (_place_road_flag & 0x07) : (_place_road_flag >> 3));
- - DoCommandP(start_tile, end_tile, _place_road_flag | (_cur_roadtype << 3) | (_one_way_button_clicked << 5),
- + DoCommandP(start_tile, end_tile, _place_road_flag | (_cur_roadtype << 3) | (_one_way_button_clicked << 5) | (_catenary_flag << 7),
- _remove_button_clicked ?
- CMD_REMOVE_LONG_ROAD | CMD_MSG(_road_type_infos[_cur_roadtype].err_remove_road) :
- CMD_BUILD_LONG_ROAD | CMD_MSG(_road_type_infos[_cur_roadtype].err_build_road), CcPlaySound1D);
- @@ -802,13 +802,13 @@ static WindowDesc _build_tramway_desc(
- *
- * @return newly opened road toolbar, or NULL if the toolbar could not be opened.
- */
- -Window *ShowBuildRoadToolbar(RoadType roadtype)
- +Window *ShowBuildRoadToolbar(RoadType roadtype, bool _catenary_flag)
- {
- if (!Company::IsValidID(_local_company)) return NULL;
- _cur_roadtype = roadtype;
- DeleteWindowByClass(WC_BUILD_TOOLBAR);
- - return AllocateWindowDescFront<BuildRoadToolbarWindow>(roadtype == ROADTYPE_ROAD ? &_build_road_desc : &_build_tramway_desc, TRANSPORT_ROAD);
- + return AllocateWindowDescFront<BuildRoadToolbarWindow>(roadtype == ROADTYPE_ROAD ? &_build_road_desc : &_build_tramway_desc, TRANSPORT_ROAD, _catenary_flag);
- }
- static const NWidgetPart _nested_build_road_scen_widgets[] = {