summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarkvater <Darkvater@openttd.org>2005-04-19 18:30:31 +0000
committerDarkvater <Darkvater@openttd.org>2005-04-19 18:30:31 +0000
commitdc415a9624c9835e1a90990fdfcdfa172a8fecb2 (patch)
tree982f964593558de4bde9bae421bcea042be69bb8
parent2d26058dcefcdbd1512bd2bea79424742a1f5032 (diff)
downloadopenttd-dc415a9624c9835e1a90990fdfcdfa172a8fecb2.tar.xz
(svn r2214) - Fix: Dragging the desert tool over half-desert turns it into full-desert; dragging the tool while pressing ctrl, will remove the desert area.
-rw-r--r--lang/english.txt2
-rw-r--r--terraform_gui.c9
2 files changed, 8 insertions, 3 deletions
diff --git a/lang/english.txt b/lang/english.txt
index 6078908f0..197a9ffe7 100644
--- a/lang/english.txt
+++ b/lang/english.txt
@@ -695,7 +695,7 @@ STR_028B_PLANT_TREES_RANDOMLY_OVER :{BLACK}Plant tr
STR_028C_PLACE_ROCKY_AREAS_ON_LANDSCAPE :{BLACK}Place rocky areas on landscape
STR_028D_PLACE_LIGHTHOUSE :{BLACK}Place lighthouse
STR_028E_PLACE_TRANSMITTER :{BLACK}Place transmitter
-STR_028F_DEFINE_DESERT_AREA :{BLACK}Define desert area
+STR_028F_DEFINE_DESERT_AREA :{BLACK}Define desert area, press and hold CTRL to remove it
STR_CREATE_LAKE :{BLACK}Define water area, will flood its surroundings if at sea level
STR_0290_DELETE :{BLACK}Delete
STR_0291_DELETE_THIS_TOWN_COMPLETELY :{BLACK}Delete this town completely
diff --git a/terraform_gui.c b/terraform_gui.c
index 03572a82d..df8acfe4a 100644
--- a/terraform_gui.c
+++ b/terraform_gui.c
@@ -46,10 +46,15 @@ static void GenerateDesertArea(TileIndex end, TileIndex start)
size_x = (ex - sx) + 1;
size_y = (ey - sy) + 1;
+ _generating_world = true;
BEGIN_TILE_LOOP(tile, size_x, size_y, TILE_XY(sx, sy)) {
- if (GetTileType(tile) != MP_WATER)
- SetMapExtraBits(tile, GetMapExtraBits(tile) == 1 ? 0 : 1);
+ if (GetTileType(tile) != MP_WATER) {
+ SetMapExtraBits(tile, (_ctrl_pressed) ? 0 : 1);
+ DoClearSquare(tile);
+ MarkTileDirtyByTile(tile);
+ }
} END_TILE_LOOP(tile, size_x, size_y, 0);
+ _generating_world = false;
}
/**