summaryrefslogtreecommitdiff
path: root/src/terraform_gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/terraform_gui.cpp')
-rw-r--r--src/terraform_gui.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/terraform_gui.cpp b/src/terraform_gui.cpp
index b45a0e9a1..48be17d99 100644
--- a/src/terraform_gui.cpp
+++ b/src/terraform_gui.cpp
@@ -107,16 +107,16 @@ bool GUIPlaceProcDragXY(ViewportDragDropSelectionProcess proc, TileIndex start_t
switch (proc) {
case DDSP_DEMOLISH_AREA:
- DoCommandP(end_tile, start_tile, 0, CMD_CLEAR_AREA | CMD_MSG(STR_ERROR_CAN_T_CLEAR_THIS_AREA), CcPlaySound10);
+ DoCommandP(end_tile, start_tile, _ctrl_pressed, CMD_CLEAR_AREA | CMD_MSG(STR_ERROR_CAN_T_CLEAR_THIS_AREA), CcPlaySound10);
break;
case DDSP_RAISE_AND_LEVEL_AREA:
- DoCommandP(end_tile, start_tile, LM_RAISE << 1, CMD_LEVEL_LAND | CMD_MSG(STR_ERROR_CAN_T_RAISE_LAND_HERE), CcTerraform);
+ DoCommandP(end_tile, start_tile, LM_RAISE << 1 | _ctrl_pressed, CMD_LEVEL_LAND | CMD_MSG(STR_ERROR_CAN_T_RAISE_LAND_HERE), CcTerraform);
break;
case DDSP_LOWER_AND_LEVEL_AREA:
- DoCommandP(end_tile, start_tile, LM_LOWER << 1, CMD_LEVEL_LAND | CMD_MSG(STR_ERROR_CAN_T_LOWER_LAND_HERE), CcTerraform);
+ DoCommandP(end_tile, start_tile, LM_LOWER << 1 | _ctrl_pressed, CMD_LEVEL_LAND | CMD_MSG(STR_ERROR_CAN_T_LOWER_LAND_HERE), CcTerraform);
break;
case DDSP_LEVEL_AREA:
- DoCommandP(end_tile, start_tile, LM_LEVEL << 1, CMD_LEVEL_LAND | CMD_MSG(STR_ERROR_CAN_T_LEVEL_LAND_HERE), CcTerraform);
+ DoCommandP(end_tile, start_tile, LM_LEVEL << 1 | _ctrl_pressed, CMD_LEVEL_LAND | CMD_MSG(STR_ERROR_CAN_T_LEVEL_LAND_HERE), CcTerraform);
break;
case DDSP_CREATE_ROCKS:
GenerateRockyArea(end_tile, start_tile);
@@ -622,7 +622,9 @@ static void ResetLandscapeConfirmationCallback(Window *w, bool confirmed)
*/
bool IsDraggingDiagonal()
{
- return false;
+ return _ctrl_pressed && _left_button_down && (
+ _place_proc == PlaceProc_DemolishArea || _place_proc == PlaceProc_LevelLand ||
+ _place_proc == PlaceProc_RaiseLand || _place_proc == PlaceProc_LowerLand);
}
struct ScenarioEditorLandscapeGenerationWindow : Window {