summaryrefslogtreecommitdiff
path: root/terraform_gui.c
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
commitcc65bd1702dbe947552945a5bb35a2d0307207fb (patch)
tree982f964593558de4bde9bae421bcea042be69bb8 /terraform_gui.c
parent0f08e835531958e8e5bef100cffed2449a3acabf (diff)
downloadopenttd-cc65bd1702dbe947552945a5bb35a2d0307207fb.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.
Diffstat (limited to 'terraform_gui.c')
-rw-r--r--terraform_gui.c9
1 files changed, 7 insertions, 2 deletions
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;
}
/**