summaryrefslogtreecommitdiff
path: root/src/mapgen_v7.cpp
diff options
context:
space:
mode:
authorproller <proller@github.com>2013-06-23 20:23:59 +0400
committerproller <proller@github.com>2013-06-23 20:35:16 +0400
commitf764297be2d55c9b8350077e44e3d62a9e058bcf (patch)
treebfabce6000d3ec50cd6472c3f9229265d58e7976 /src/mapgen_v7.cpp
parent75b8c13b0042678a909becbde8f1f82400f2d8ac (diff)
downloadminetest-f764297be2d55c9b8350077e44e3d62a9e058bcf.tar.gz
minetest-f764297be2d55c9b8350077e44e3d62a9e058bcf.tar.bz2
minetest-f764297be2d55c9b8350077e44e3d62a9e058bcf.zip
Math mapgen fix, ip show on connect, pathfinder segfault fix
Diffstat (limited to 'src/mapgen_v7.cpp')
-rw-r--r--src/mapgen_v7.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/mapgen_v7.cpp b/src/mapgen_v7.cpp
index 301922be5..870e7343e 100644
--- a/src/mapgen_v7.cpp
+++ b/src/mapgen_v7.cpp
@@ -76,7 +76,10 @@ MapgenV7::MapgenV7(int mapgenid, MapgenV7Params *params, EmergeManager *emerge)
this->seed = (int)params->seed;
this->water_level = params->water_level;
- this->flags = params->flags;
+ this->flags = params->flags;
+ this->lighting = 1;
+ this->ridges = 1;
+
this->csize = v3s16(1, 1, 1) * params->chunksize * MAP_BLOCKSIZE;
this->ystride = csize.X; //////fix this
@@ -183,7 +186,8 @@ void MapgenV7::makeChunk(BlockMakeData *data) {
c_lava_source = ndef->getId("mapgen_lava_source");
generateTerrain();
- carveRidges();
+ if (this->ridges)
+ carveRidges();
if (flags & MG_CAVES)
generateCaves(stone_surface_max_y);
@@ -211,7 +215,8 @@ void MapgenV7::makeChunk(BlockMakeData *data) {
updateLiquid(&data->transforming_liquid, full_node_min, full_node_max);
- calcLighting(node_min - v3s16(1, 0, 1) * MAP_BLOCKSIZE,
+ if (this->lighting)
+ calcLighting(node_min - v3s16(1, 0, 1) * MAP_BLOCKSIZE,
node_max + v3s16(1, 0, 1) * MAP_BLOCKSIZE);
//setLighting(node_min - v3s16(1, 0, 1) * MAP_BLOCKSIZE,
// node_max + v3s16(1, 0, 1) * MAP_BLOCKSIZE, 0xFF);