Changeset - r7904:48e24447e475
[Not reviewed]
master
0 2 0
rubidium - 17 years ago 2007-11-18 08:03:48
rubidium@openttd.org
(svn r11455) -Codechange: make autoroad, 'normal' road building and 'normal' rail building all react the same on CTRL as autorail.
2 files changed with 7 insertions and 5 deletions:
0 comments (0 inline, 0 general)
src/rail_gui.cpp
Show inline comments
 
@@ -516,8 +516,7 @@ static void BuildRailToolbWndProc(Window
 
					if (_ctrl_pressed) _remove_button_clicked = true;
 
					HandleAutodirPlacement();
 
					_remove_button_clicked = old;
 
					break;
 
				}
 
				} break;
 

	
 
				case DDSP_BUILD_SIGNALS:
 
					HandleAutoSignalPlacement();
 
@@ -540,9 +539,12 @@ static void BuildRailToolbWndProc(Window
 
					break;
 

	
 
				case DDSP_PLACE_RAIL_NE:
 
				case DDSP_PLACE_RAIL_NW:
 
				case DDSP_PLACE_RAIL_NW: {
 
					bool old = _remove_button_clicked;
 
					if (_ctrl_pressed) _remove_button_clicked = true;
 
					DoRailroadTrack(e->we.place.select_proc == DDSP_PLACE_RAIL_NE ? TRACK_X : TRACK_Y);
 
					break;
 
					_remove_button_clicked = old;
 
				} break;
 
			}
 
		}
 
		break;
src/road_gui.cpp
Show inline comments
 
@@ -504,7 +504,7 @@ static void BuildRoadToolbWndProc(Window
 
					_place_road_flag = (RoadFlags)((_place_road_flag & RF_DIR_Y) ? (_place_road_flag & 0x07) : (_place_road_flag >> 3));
 

	
 
					DoCommandP(end_tile, start_tile, _place_road_flag | (_cur_roadtype << 3) | _ctrl_pressed << 5, CcPlaySound1D,
 
						_remove_button_clicked ?
 
						(_ctrl_pressed || _remove_button_clicked) ?
 
						CMD_REMOVE_LONG_ROAD | CMD_NO_WATER | CMD_MSG(_road_type_infos[_cur_roadtype].err_remove_road) :
 
						CMD_BUILD_LONG_ROAD | CMD_NO_WATER | CMD_MSG(_road_type_infos[_cur_roadtype].err_build_road));
 
					break;
0 comments (0 inline, 0 general)