(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.

This commit is contained in:
Darkvater
2005-04-19 18:30:31 +00:00
parent 0f08e83553
commit cc65bd1702
2 changed files with 8 additions and 3 deletions

View File

@@ -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;
}
/**