summaryrefslogtreecommitdiff
path: root/src/world.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/world.cpp')
-rw-r--r--src/world.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/world.cpp b/src/world.cpp
index e176913..9a504c3 100644
--- a/src/world.cpp
+++ b/src/world.cpp
@@ -34,10 +34,12 @@ void world_t::generate_tile(tile_t *tile, tile_index_t x)
if (height < waterlevel)
tile->type = TILE_NONE;
- else if (height < waterlevel + 0.3)
+ else if (height < waterlevel + 0.1)
tile->type = TILE_DIRT;
- else
+ else if (perlin.get(x, 3.0f) > 0.0f)
tile->type = TILE_WALL;
+ else
+ tile->type = TILE_DIRT;
}
void world_t::generate(sector_t *sector, sector_index_t index, bool partial)
@@ -65,7 +67,7 @@ void world_t::generate(sector_t *sector, sector_index_t index, bool partial)
tile = sector->tiles + ly * SECTOR_SIZE + lx;
tile->neighbors = 0;
- for (size_t i = 0; i < 4; i++) {
+ for (size_t i = 0; i < 8; i++) {
tile_index_t neighbor_index;
tile_t *neighbor;